* (bug 4259) Indicate when a protected page being edited is an interface message ("editinginterface")
* (bug 5684) Introduce Special:Randomredirect
* (bug 5611) Add a name attribute to the text box containing source text in
read-only pages
+* Indicate when a protected page is an interface message ("protectedinterface")
+* (bug 4259) Indicate when a protected page being edited is an interface message
+ ("editinginterface")
== Compatibility ==
}
if( $this->mTitle->isProtected( 'edit' ) ) {
- if( $this->mTitle->isSemiProtected() ) {
+ # Is the protection due to the namespace, e.g. interface text?
+ if( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) {
+ # Yes; remind the user
+ $notice = wfMsg( 'editinginterface' );
+ } elseif( $this->mTitle->isSemiProtected() ) {
+ # No; semi protected
$notice = wfMsg( 'semiprotectedpagewarning' );
if( wfEmptyMsg( 'semiprotectedpagewarning', $notice ) || $notice == '-' ) {
$notice = '';
}
} else {
+ # No; regular protection
$notice = wfMsg( 'protectedpagewarning' );
}
$wgOut->addWikiText( $notice );
$skin = $wgUser->getSkin();
$this->setPageTitle( wfMsg( 'viewsource' ) );
$this->setSubtitle( wfMsg( 'viewsourcefor', $skin->makeKnownLinkObj( $wgTitle ) ) );
- $this->addWikiText( wfMsg( 'protectedtext' ) );
+
+ # Determine if protection is due to the page being a system message
+ # and show an appropriate explanation
+ if( $wgTitle->getNamespace() == NS_MEDIAWIKI && !$wgUser->isAllowed( 'editinterface' ) ) {
+ $this->addWikiText( wfMsg( 'protectedinterface' ) );
+ } else {
+ $this->addWikiText( wfMsg( 'protectedtext' ) );
+ }
} else {
$this->setPageTitle( wfMsg( 'readonly' ) );
if ( $wgReadOnly ) {
[[Project:Protected page]].
You can view and copy the source of this page:',
+'protectedinterface' => 'This page provides interface text for the software, and is locked to prevent abuse.',
+'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.",
'sqlhidden' => '(SQL query hidden)',
# Login and logout pages