Page MenuHomePhabricator

patch.diff

Authored By
bzimport
Nov 21 2014, 10:36 PM
Size
2 KB
Referenced Files
None
Subscribers
None

patch.diff

Index: includes/specials/SpecialMovepage.php
===================================================================
--- includes/specials/SpecialMovepage.php (revision 50051)
+++ includes/specials/SpecialMovepage.php (working copy)
@@ -165,7 +165,23 @@
$wgOut->wrapWikiMsg( '<p><strong class="error">$1</strong></p>', $err );
}
}
-
+
+ if ( $this->oldTitle->isProtected( 'move' ) ) {
+ # Is the title semi-protected?
+ if ( $this->oldTitle->isSemiProtected( 'move' ) ) {
+ $noticeMsg = 'semiprotectedpagemovewarning';
+ $classes[] = 'mw-textarea-sprotected';
+ } else {
+ # Then it must be protected based on static groups (regular)
+ $noticeMsg = 'protectedpagemovewarning';
+ $classes[] = 'mw-textarea-protected';
+ }
+ $wgOut->addHTML( "<div class='mw-warning-with-logexcerpt'>\n" );
+ $wgOut->addWikiMsg( $noticeMsg );
+ LogEventsList::showLogExtract( $wgOut, 'protect', $this->oldTitle->getPrefixedText(), '', 1 );
+ $wgOut->addHTML( "</div>\n" );
+ }
+
$wgOut->addHTML(
Xml::openElement( 'form', array( 'method' => 'post', 'action' => $titleObj->getLocalURL( 'action=submit' ), 'id' => 'movepage' ) ) .
Xml::openElement( 'fieldset' ) .
Index: languages/messages/MessagesEn.php
===================================================================
--- languages/messages/MessagesEn.php (revision 50051)
+++ languages/messages/MessagesEn.php (working copy)
@@ -1164,6 +1164,8 @@
'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 administrator 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 [[Special:ListGroupRights|specific rights]] are needed to create it.'''",
+'protectedpagemovewarning' => "'''WARNING: This page has been locked so that only users with administrator privileges can move it.",
+'semiprotectedpagemovewarning' => "'''Note:''' This page has been locked so that only registered users can move it.",
'templatesused' => 'Templates used on this page:',
'templatesusedpreview' => 'Templates used in this preview:',
'templatesusedsection' => 'Templates used in this section:',

File Metadata

Mime Type
text/x-diff
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
5236
Default Alt Text
patch.diff (2 KB)

Event Timeline