Index: trunk/phase3/includes/EditPage.php |
— | — | @@ -799,12 +799,18 @@ |
800 | 800 | } |
801 | 801 | |
802 | 802 | if( $this->mTitle->isProtected( 'edit' ) ) { |
803 | | - if( $this->mTitle->isSemiProtected() ) { |
| 803 | + # Is the protection due to the namespace, e.g. interface text? |
| 804 | + if( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) { |
| 805 | + # Yes; remind the user |
| 806 | + $notice = wfMsg( 'editinginterface' ); |
| 807 | + } elseif( $this->mTitle->isSemiProtected() ) { |
| 808 | + # No; semi protected |
804 | 809 | $notice = wfMsg( 'semiprotectedpagewarning' ); |
805 | 810 | if( wfEmptyMsg( 'semiprotectedpagewarning', $notice ) || $notice == '-' ) { |
806 | 811 | $notice = ''; |
807 | 812 | } |
808 | 813 | } else { |
| 814 | + # No; regular protection |
809 | 815 | $notice = wfMsg( 'protectedpagewarning' ); |
810 | 816 | } |
811 | 817 | $wgOut->addWikiText( $notice ); |
Index: trunk/phase3/includes/OutputPage.php |
— | — | @@ -812,7 +812,14 @@ |
813 | 813 | $skin = $wgUser->getSkin(); |
814 | 814 | $this->setPageTitle( wfMsg( 'viewsource' ) ); |
815 | 815 | $this->setSubtitle( wfMsg( 'viewsourcefor', $skin->makeKnownLinkObj( $wgTitle ) ) ); |
816 | | - $this->addWikiText( wfMsg( 'protectedtext' ) ); |
| 816 | + |
| 817 | + # Determine if protection is due to the page being a system message |
| 818 | + # and show an appropriate explanation |
| 819 | + if( $wgTitle->getNamespace() == NS_MEDIAWIKI && !$wgUser->isAllowed( 'editinterface' ) ) { |
| 820 | + $this->addWikiText( wfMsg( 'protectedinterface' ) ); |
| 821 | + } else { |
| 822 | + $this->addWikiText( wfMsg( 'protectedtext' ) ); |
| 823 | + } |
817 | 824 | } else { |
818 | 825 | $this->setPageTitle( wfMsg( 'readonly' ) ); |
819 | 826 | if ( $wgReadOnly ) { |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -120,6 +120,9 @@ |
121 | 121 | * (bug 5684) Introduce Special:Randomredirect |
122 | 122 | * (bug 5611) Add a name attribute to the text box containing source text in |
123 | 123 | read-only pages |
| 124 | +* Indicate when a protected page is an interface message ("protectedinterface") |
| 125 | +* (bug 4259) Indicate when a protected page being edited is an interface message |
| 126 | + ("editinginterface") |
124 | 127 | |
125 | 128 | == Compatibility == |
126 | 129 | |
Index: trunk/phase3/languages/Messages.php |
— | — | @@ -342,6 +342,8 @@ |
343 | 343 | [[Project:Protected page]]. |
344 | 344 | |
345 | 345 | You can view and copy the source of this page:', |
| 346 | +'protectedinterface' => 'This page provides interface text for the software, and is locked to prevent abuse.', |
| 347 | +'editinginterface' => "'''Warning:''' You are editing a page which is used to provide interface text for the software. Changes to this page will affect the appearance of the user interface for other users.", |
346 | 348 | 'sqlhidden' => '(SQL query hidden)', |
347 | 349 | |
348 | 350 | # Login and logout pages |