From: Gabriel Wicke Date: Thu, 3 Jun 2004 02:23:17 +0000 (+0000) Subject: protect global stylesheets to devs only X-Git-Tag: 1.5.0alpha1~3053 X-Git-Url: http://git.cyclocoop.org/%24self?a=commitdiff_plain;h=42fa47fcd2977ea84117d91b33810842d08675ea;p=lhc%2Fweb%2Fwiklou.git protect global stylesheets to devs only --- diff --git a/includes/Title.php b/includes/Title.php index 97f566ada9..19568ad9b5 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -492,6 +492,11 @@ class Title { if ( NS_MEDIAWIKI == $this->mNamespace && !$wgUser->isSysop() ) { return false; } # if ( 0 == $this->getArticleID() ) { return false; } if ( $this->mDbkeyform == "_" ) { return false; } + # protect global styles and js + if ( NS_MEDIAWIKI == $this->mNamespace + && !$wgUser->isDeveloper() + && preg_match("/\\.(css|js)$/", $this->mTextform )) + { return false; } //if ( $this->isCssJsSubpage() and !$this->userCanEditCssJsSubpage() ) { return false; } # protect css/js subpages of user pages # XXX: this might be better using restrictions