From: Brion Vibber Date: Wed, 2 Jan 2008 19:51:34 +0000 (+0000) Subject: * (bug 12486) Protected titles now give a warning for privileged editors. X-Git-Tag: 1.31.0-rc.0~50177 X-Git-Url: http://git.cyclocoop.org/%22.%24h.%22?a=commitdiff_plain;h=615a4b3ab041803cd121969839ab5f4797b6f276;p=lhc%2Fweb%2Fwiklou.git * (bug 12486) Protected titles now give a warning for privileged editors. Patch by Alexandre Emsenhuber -- http://bugzilla.wikimedia.org/attachment.cgi?id=4500 --- diff --git a/RELEASE-NOTES b/RELEASE-NOTES index f2ca88a1cb..0df4c52602 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -114,6 +114,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * Parser now returns list of sections * When a user is prohibited from creating a page, a title of "View source" makes no sense, and there should be no "Return to [[Page]]" link. +* (bug 12486) Protected titles now give a warning for privileged editors. + === Bug fixes in 1.12 === diff --git a/includes/EditPage.php b/includes/EditPage.php index 8fa5417048..cd028e21ca 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1105,6 +1105,9 @@ class EditPage { } $wgOut->addWikiText( $notice ); } + if( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) != array() ){ + $wgOut->addWikiText( wfMsg( 'titleprotectedwarning' ) ); + } if ( $this->kblength === false ) { $this->kblength = (int)(strlen( $this->textbox1 ) / 1024); diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 13e0b105eb..e2188b0508 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -1076,6 +1076,7 @@ the text into a text file and save it for later.', 'protectedpagewarning' => 'WARNING: This page has been locked so that only users with sysop privileges can edit it.', 'semiprotectedpagewarning' => "'''Note:''' This page has been locked so that only registered users can edit it.", 'cascadeprotectedwarning' => "'''Warning:''' This page has been locked so that only users with sysop privileges can edit it, because it is included in the following cascade-protected {{PLURAL:$1|page|pages}}:", +'titleprotectedwarning' => 'WARNING: This page has been locked so that only some users can create it.', 'templatesused' => 'Templates used on this page:', 'templatesusedpreview' => 'Templates used in this preview:', 'templatesusedsection' => 'Templates used in this section:', diff --git a/languages/messages/MessagesFr.php b/languages/messages/MessagesFr.php index d0034f2104..d7d3ebeb7b 100644 --- a/languages/messages/MessagesFr.php +++ b/languages/messages/MessagesFr.php @@ -615,6 +615,7 @@ vous ne pourrez donc pas sauvegarder vos modifications maintenant. Vous pouvez c Seuls les utilisateurs ayant le statut d’administrateur peuvent la modifier..'''", 'semiprotectedpagewarning' => "'''Note :''' Cette page a été protégée de telle façon que seuls les contributeurs enregistrés puissent la modifier.", 'cascadeprotectedwarning' => 'ATTENTION : Cette page a été protégée de manière à ce que seuls les [[{{MediaWiki:Grouppage-sysop}}|administrateurs]] puissent l’éditer. Cette protection a été faite car cette page est incluse dans {{PLURAL:$1|une page protégée|des pages protégées}} avec la « protection en cascade » activée.', +'titleprotectedwarning' => 'ATTENTION : Cette page a été protégée de telle manière que seuls certains utilisateurs puissent la créer.', 'templatesused' => 'Modèles utilisés sur cette page :', 'templatesusedpreview' => 'Modèles utilisés dans cette prévisualisation :', 'templatesusedsection' => 'Modèles utilisés dans cette section :', diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 7dbbbc2059..61c918005a 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -523,6 +523,7 @@ $wgMessageStructure = array( 'protectedpagewarning', 'semiprotectedpagewarning', 'cascadeprotectedwarning', + 'titleprotectedwarning', 'templatesused', 'templatesusedpreview', 'templatesusedsection',