Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1967,6 +1967,8 @@ |
1968 | 1968 | 'imageinvalidfilename', |
1969 | 1969 | 'fix-double-redirects', |
1970 | 1970 | 'move-leave-redirect', |
| 1971 | + 'protectedpagemovewarning', |
| 1972 | + 'semiprotectedpagemovewarning', |
1971 | 1973 | ), |
1972 | 1974 | 'export' => array( |
1973 | 1975 | 'export', |
Index: trunk/phase3/includes/specials/SpecialMovepage.php |
— | — | @@ -166,6 +166,22 @@ |
167 | 167 | } |
168 | 168 | } |
169 | 169 | |
| 170 | + if ( $this->oldTitle->isProtected( 'move' ) ) { |
| 171 | + # Is the title semi-protected? |
| 172 | + if ( $this->oldTitle->isSemiProtected( 'move' ) ) { |
| 173 | + $noticeMsg = 'semiprotectedpagemovewarning'; |
| 174 | + $classes[] = 'mw-textarea-sprotected'; |
| 175 | + } else { |
| 176 | + # Then it must be protected based on static groups (regular) |
| 177 | + $noticeMsg = 'protectedpagemovewarning'; |
| 178 | + $classes[] = 'mw-textarea-protected'; |
| 179 | + } |
| 180 | + $wgOut->addHTML( "<div class='mw-warning-with-logexcerpt'>\n" ); |
| 181 | + $wgOut->addWikiMsg( $noticeMsg ); |
| 182 | + LogEventsList::showLogExtract( $wgOut, 'protect', $this->oldTitle->getPrefixedText(), '', 1 ); |
| 183 | + $wgOut->addHTML( "</div>\n" ); |
| 184 | + } |
| 185 | + |
170 | 186 | $wgOut->addHTML( |
171 | 187 | Xml::openElement( 'form', array( 'method' => 'post', 'action' => $titleObj->getLocalURL( 'action=submit' ), 'id' => 'movepage' ) ) . |
172 | 188 | Xml::openElement( 'fieldset' ) . |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2820,6 +2820,8 @@ |
2821 | 2821 | 'imageinvalidfilename' => 'The target file name is invalid', |
2822 | 2822 | 'fix-double-redirects' => 'Update any redirects that point to the original title', |
2823 | 2823 | 'move-leave-redirect' => 'Leave a redirect behind', |
| 2824 | +'protectedpagemovewarning' => "'''WARNING: This page has been locked so that only users with administrator privileges can move it.", |
| 2825 | +'semiprotectedpagemovewarning' => "'''Note:''' This page has been locked so that only registered users can move it.", |
2824 | 2826 | |
2825 | 2827 | # Export |
2826 | 2828 | 'export' => 'Export pages', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -51,6 +51,7 @@ |
52 | 52 | * (bug 9219) Auth plugins can control editing RealName/Email/Nick preferences |
53 | 53 | * New hook: MessageNotInMwNs to handle localised messages that aren't in the |
54 | 54 | Mediawiki Namespace, before checking the message files |
| 55 | +* (bug 18466) Add note or warning when overruling a move (semi-)protection |
55 | 56 | |
56 | 57 | === Bug fixes in 1.16 === |
57 | 58 | |