From: Ævar Arnfjörð Bjarmason Date: Sun, 9 Oct 2005 20:51:34 +0000 (+0000) Subject: * Comment on potential bug X-Git-Tag: 1.6.0~1489 X-Git-Url: http://git.cyclocoop.org/url?a=commitdiff_plain;h=7fe1ab9b8b552e24f83a8a56860fe191167a6467;p=lhc%2Fweb%2Fwiklou.git * Comment on potential bug * $fname = 'Title::userCanEdit'; => $fname = 'Title::userCan'; * Documentation --- diff --git a/includes/Title.php b/includes/Title.php index 4a0767787d..69e18a21d2 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -607,7 +607,7 @@ class Title { */ function getPrefixedText() { global $wgContLang; - if ( empty( $this->mPrefixedText ) ) { + if ( empty( $this->mPrefixedText ) ) { // FIXME: bad usage of empty() ? $s = $this->prefix( $this->mTextform ); $s = str_replace( '_', ' ', $s ); $this->mPrefixedText = $s; @@ -922,7 +922,7 @@ class Title { * @access private */ function userCan($action) { - $fname = 'Title::userCanEdit'; + $fname = 'Title::userCan'; wfProfileIn( $fname ); global $wgUser; @@ -930,11 +930,14 @@ class Title { wfProfileOut( $fname ); return false; } + // XXX: This is the code that prevents unprotecting a page in NS_MEDIAWIKI + // from taking effect -ævar if( NS_MEDIAWIKI == $this->mNamespace && !$wgUser->isAllowed('editinterface') ) { wfProfileOut( $fname ); return false; } + if( $this->mDbkeyform == '_' ) { # FIXME: Is this necessary? Shouldn't be allowed anyway... wfProfileOut( $fname );