From: Ævar Arnfjörð Bjarmason Date: Wed, 21 Dec 2005 02:35:20 +0000 (+0000) Subject: * 0 => NS_MAIN X-Git-Tag: 1.6.0~918 X-Git-Url: http://git.cyclocoop.org/ecrire?a=commitdiff_plain;h=e7fe879f24a6f4508b96f042aa57123e30ce4a23;p=lhc%2Fweb%2Fwiklou.git * 0 => NS_MAIN * Simplified Namespace::isMovable() --- diff --git a/includes/Namespace.php b/includes/Namespace.php index f1341cc561..15fc36e5da 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -56,10 +56,7 @@ class Namespace { * @return bool */ function isMovable( $index ) { - if ( $index < NS_MAIN || $index == NS_IMAGE || $index == NS_CATEGORY ) { - return false; - } - return true; + return !( $index < NS_MAIN || $index == NS_IMAGE || $index == NS_CATEGORY ); } /** @@ -75,7 +72,7 @@ class Namespace { * @return bool */ function isTalk( $index ) { - return ($index > 0) // Special namespaces are negative + return ($index > NS_MAIN) // Special namespaces are negative && ($index % 2); // Talk namespaces are odd-numbered }