* (bug 12486) Protected titles now give a warning for privileged editors.
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 2 Jan 2008 19:51:34 +0000 (19:51 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 2 Jan 2008 19:51:34 +0000 (19:51 +0000)
Patch by  Alexandre Emsenhuber  --  http://bugzilla.wikimedia.org/attachment.cgi?id=4500

RELEASE-NOTES
includes/EditPage.php
languages/messages/MessagesEn.php
languages/messages/MessagesFr.php
maintenance/language/messages.inc

index f2ca88a..0df4c52 100644 (file)
@@ -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 ===
 
index 8fa5417..cd028e2 100644 (file)
@@ -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);
index 13e0b10..e2188b0 100644 (file)
@@ -1076,6 +1076,7 @@ the text into a text file and save it for later.</strong>',
 'protectedpagewarning'      => '<strong>WARNING:  This page has been locked so that only users with sysop privileges can edit it.</strong>',
 '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'     => '<strong>WARNING:  This page has been locked so that only some users can create it.</strong>',
 'templatesused'             => 'Templates used on this page:',
 'templatesusedpreview'      => 'Templates used in this preview:',
 'templatesusedsection'      => 'Templates used in this section:',
index d0034f2..d7d3ebe 100644 (file)
@@ -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'   => '<strong>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.</strong>',
+'titleprotectedwarning'     => '<strong>ATTENTION : Cette page a été protégée de telle manière que seuls certains utilisateurs puissent la créer.</strong>',
 '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 :',
index 7dbbbc2..61c9180 100644 (file)
@@ -523,6 +523,7 @@ $wgMessageStructure = array(
                'protectedpagewarning',
                'semiprotectedpagewarning',
                'cascadeprotectedwarning',
+               'titleprotectedwarning',
                'templatesused',
                'templatesusedpreview',
                'templatesusedsection',