From: Niklas Laxström Date: Mon, 27 Nov 2006 22:55:12 +0000 (+0000) Subject: * Indentation, magic numbers X-Git-Tag: 1.31.0-rc.0~55058 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=a77e0f4231f0e3668ced5121c0627f162a9fe1bd;p=lhc%2Fweb%2Fwiklou.git * Indentation, magic numbers --- diff --git a/includes/Namespace.php b/includes/Namespace.php index 73dc296930..78493902f2 100644 --- a/includes/Namespace.php +++ b/includes/Namespace.php @@ -11,7 +11,7 @@ $wgCanonicalNamespaceNames = array( NS_MEDIA => 'Media', NS_SPECIAL => 'Special', - NS_TALK => 'Talk', + NS_TALK => 'Talk', NS_USER => 'User', NS_USER_TALK => 'User_talk', NS_PROJECT => 'Project', @@ -24,7 +24,7 @@ $wgCanonicalNamespaceNames = array( NS_TEMPLATE_TALK => 'Template_talk', NS_HELP => 'Help', NS_HELP_TALK => 'Help_talk', - NS_CATEGORY => 'Category', + NS_CATEGORY => 'Category', NS_CATEGORY_TALK => 'Category_talk', ); diff --git a/includes/Title.php b/includes/Title.php index 3bcc06449d..f2b8d10c62 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -984,7 +984,7 @@ class Title { */ function isProtected( $action = '' ) { global $wgRestrictionLevels; - if ( -1 == $this->mNamespace ) { return true; } + if ( NS_SPECIAL == $this->mNamespace ) { return true; } if( $action == 'edit' || $action == '' ) { $r = $this->getRestrictions( 'edit' ); @@ -1016,7 +1016,7 @@ class Title { global $wgUser; if ( is_null( $this->mWatched ) ) { - if ( -1 == $this->mNamespace || 0 == $wgUser->getID()) { + if ( NS_SPECIAL == $this->mNamespace || !$wgUser->isLoggedIn()) { $this->mWatched = false; } else { $this->mWatched = $wgUser->isWatched( $this ); @@ -1517,7 +1517,7 @@ class Title { # We already know that some pages won't be in the database! # - if ( '' != $this->mInterwiki || -1 == $this->mNamespace ) { + if ( '' != $this->mInterwiki || NS_SPECIAL == $this->mNamespace ) { $this->mArticleID = 0; } $f = strstr( $r, '#' );