From 7fe1ab9b8b552e24f83a8a56860fe191167a6467 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=C3=86var=20Arnfj=C3=B6r=C3=B0=20Bjarmason?= Date: Sun, 9 Oct 2005 20:51:34 +0000 Subject: [PATCH] * Comment on potential bug * $fname = 'Title::userCanEdit'; => $fname = 'Title::userCan'; * Documentation --- includes/Title.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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 ); -- 2.20.1