From e8c970ebcbe186f8daddb97f91aa6fe6cc6d7291 Mon Sep 17 00:00:00 2001 From: Gabriel Wicke Date: Thu, 3 Jun 2004 01:41:45 +0000 Subject: [PATCH] disallow any editing in the MediaWiki NS for non-sysop users --- includes/Title.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/Title.php b/includes/Title.php index 2813a7550b..97f566ada9 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -487,15 +487,15 @@ class Title { # Can $wgUser edit this page? function userCanEdit() { - + global $wgUser; if ( -1 == $this->mNamespace ) { return false; } + if ( NS_MEDIAWIKI == $this->mNamespace && !$wgUser->isSysop() ) { return false; } # if ( 0 == $this->getArticleID() ) { return false; } if ( $this->mDbkeyform == "_" ) { return false; } //if ( $this->isCssJsSubpage() and !$this->userCanEditCssJsSubpage() ) { return false; } # protect css/js subpages of user pages # XXX: this might be better using restrictions # XXX: Find a way to work around the php bug that prevents using $this->userCanEditCssJsSubpage() from working - global $wgUser; if( Namespace::getUser() == $this->mNamespace and preg_match("/\\.(css|js)$/", $this->mTextform ) and !$wgUser->isSysop() -- 2.20.1