From 5749cfa480f9928448181bdc7854c73642698df5 Mon Sep 17 00:00:00 2001 From: Sam Reed Date: Sun, 5 Jun 2011 18:29:43 +0000 Subject: [PATCH] * (bug 21107) Split error "customcssjsprotected" into separate messages for JS and CSS --- RELEASE-NOTES-1.19 | 1 + includes/Title.php | 4 ++-- includes/api/ApiBase.php | 3 ++- languages/messages/MessagesEn.php | 3 ++- maintenance/language/messages.inc | 3 ++- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 00db195244..82e5ca0ab9 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -22,6 +22,7 @@ production. and the functionality has been moved to the relevant extensions. See http://www.mediawiki.org/wiki/Extension:DublinCoreRdf and http://www.mediawiki.org/wiki/Extension:CreativeCoreRdf as appropriate +* (bug 21107) Split error "customcssjsprotected" into separate messages for JS and CSS === New features in 1.19 === * (bug 28916) A way to to toggle mw.config legacy globals settings from diff --git a/includes/Title.php b/includes/Title.php index b352169615..441f2917db 100644 --- a/includes/Title.php +++ b/includes/Title.php @@ -1376,9 +1376,9 @@ class Title { if ( $action != 'patrol' && !$user->isAllowed( 'editusercssjs' ) && !preg_match( '/^' . preg_quote( $user->getName(), '/' ) . '\//', $this->mTextform ) ) { if ( $this->isCssSubpage() && !$user->isAllowed( 'editusercss' ) ) { - $errors[] = array( 'customcssjsprotected' ); + $errors[] = array( 'customcssprotected' ); } else if ( $this->isJsSubpage() && !$user->isAllowed( 'edituserjs' ) ) { - $errors[] = array( 'customcssjsprotected' ); + $errors[] = array( 'customjsprotected' ); } } diff --git a/includes/api/ApiBase.php b/includes/api/ApiBase.php index cff19588ec..d63061518d 100644 --- a/includes/api/ApiBase.php +++ b/includes/api/ApiBase.php @@ -970,7 +970,8 @@ abstract class ApiBase { 'ns-specialprotected' => array( 'code' => 'unsupportednamespace', 'info' => "Pages in the Special namespace can't be edited" ), 'protectedinterface' => array( 'code' => 'protectednamespace-interface', 'info' => "You're not allowed to edit interface messages" ), 'namespaceprotected' => array( 'code' => 'protectednamespace', 'info' => "You're not allowed to edit pages in the ``\$1'' namespace" ), - 'customcssjsprotected' => array( 'code' => 'customcssjsprotected', 'info' => "You're not allowed to edit custom CSS and JavaScript pages" ), + 'customcssprotected' => array( 'code' => 'customcssprotected', 'info' => "You're not allowed to edit custom CSS pages" ), + 'customjsprotected' => array( 'code' => 'customjsprotected', 'info' => "You're not allowed to edit custom JavaScript pages" ), 'cascadeprotected' => array( 'code' => 'cascadeprotected', 'info' => "The page you're trying to edit is protected because it's included in a cascade-protected page" ), 'protectedpagetext' => array( 'code' => 'protectedpage', 'info' => "The ``\$1'' right is required to edit this page" ), 'protect-cantedit' => array( 'code' => 'cantedit', 'info' => "You can't protect this page because you can't edit it" ), diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 128f1ddc9f..741a2caeeb 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1028,7 +1028,8 @@ For translations, please consider using [http://translatewiki.net/wiki/Main_Page 'cascadeprotected' => 'This page has been protected from editing, because it is included in the following {{PLURAL:$1|page, which is|pages, which are}} protected with the "cascading" option turned on: $2', 'namespaceprotected' => "You do not have permission to edit pages in the '''$1''' namespace.", -'customcssjsprotected' => "You do not have permission to edit this page, because it contains another user's personal settings.", +'customcssprotected' => "You do not have permission to edit this JavaScript page, because it contains another user's personal settings.", +'customjsprotected' => "You do not have permission to edit this CSS page, because it contains another user's personal settings.", 'ns-specialprotected' => 'Special pages cannot be edited.', 'titleprotected' => 'This title has been protected from creation by [[User:$1|$1]]. The reason given is "\'\'$2\'\'".', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index b86b3ccad9..2a885451ee 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -405,7 +405,8 @@ $wgMessageStructure = array( 'sqlhidden', 'cascadeprotected', 'namespaceprotected', - 'customcssjsprotected', + 'customcssprotected', + 'customjsprotected', 'ns-specialprotected', 'titleprotected', ), -- 2.20.1