r12182 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12181‎ | r12182 | r12183 >
Date:02:35, 21 December 2005
Author:avar
Status:old
Tags:
Comment:
* 0 => NS_MAIN
* Simplified Namespace::isMovable()
Modified paths:
  • /trunk/phase3/includes/Namespace.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Namespace.php
@@ -56,10 +56,7 @@
5757 * @return bool
5858 */
5959 function isMovable( $index ) {
60 - if ( $index < NS_MAIN || $index == NS_IMAGE || $index == NS_CATEGORY ) {
61 - return false;
62 - }
63 - return true;
 60+ return !( $index < NS_MAIN || $index == NS_IMAGE || $index == NS_CATEGORY );
6461 }
6562
6663 /**
@@ -75,7 +72,7 @@
7673 * @return bool
7774 */
7875 function isTalk( $index ) {
79 - return ($index > 0) // Special namespaces are negative
 76+ return ($index > NS_MAIN) // Special namespaces are negative
8077 && ($index % 2); // Talk namespaces are odd-numbered
8178 }
8279

Status & tagging log