summaryrefslogtreecommitdiff
path: root/includes/SpecialMovepage.php
diff options
context:
space:
mode:
authorPierre Schmitz <pierre@archlinux.de>2006-10-11 20:21:25 +0000
committerPierre Schmitz <pierre@archlinux.de>2006-10-11 20:21:25 +0000
commitd81f562b712f2387fa02290bf2ca86392ab356f2 (patch)
treed666cdefbe6ac320827a2c6cb473581b46e22c4c /includes/SpecialMovepage.php
parent183851b06bd6c52f3cae5375f433da720d410447 (diff)
Aktualisierung auf Version 1.8.1
Diffstat (limited to 'includes/SpecialMovepage.php')
-rw-r--r--includes/SpecialMovepage.php21
1 files changed, 14 insertions, 7 deletions
diff --git a/includes/SpecialMovepage.php b/includes/SpecialMovepage.php
index 39397129..e33c1530 100644
--- a/includes/SpecialMovepage.php
+++ b/includes/SpecialMovepage.php
@@ -11,12 +11,19 @@
function wfSpecialMovepage( $par = null ) {
global $wgUser, $wgOut, $wgRequest, $action, $wgOnlySysopMayMove;
- # check rights. We don't want newbies to move pages to prevents possible attack
- if ( !$wgUser->isAllowed( 'move' ) or $wgUser->isBlocked() or ($wgOnlySysopMayMove and $wgUser->isNewbie())) {
- $wgOut->showErrorPage( "movenologin", "movenologintext" );
+ # Check rights
+ if ( !$wgUser->isAllowed( 'move' ) ) {
+ $wgOut->showErrorPage( 'movenologin', 'movenologintext' );
return;
}
- # We don't move protected pages
+
+ # Don't allow blocked users to move pages
+ if ( $wgUser->isBlocked() ) {
+ $wgOut->blockedPage();
+ return;
+ }
+
+ # Check for database lock
if ( wfReadOnly() ) {
$wgOut->readOnlyPage();
return;
@@ -249,8 +256,8 @@ class MovePageForm {
$wgOut->setPagetitle( wfMsg( 'movepage' ) );
$wgOut->setSubtitle( wfMsg( 'pagemovedsub' ) );
- $oldText = $wgRequest->getVal('oldtitle');
- $newText = $wgRequest->getVal('newtitle');
+ $oldText = wfEscapeWikiText( $wgRequest->getVal('oldtitle') );
+ $newText = wfEscapeWikiText( $wgRequest->getVal('newtitle') );
$talkmoved = $wgRequest->getVal('talkmoved');
$text = wfMsg( 'pagemovedtext', $oldText, $newText );
@@ -266,7 +273,7 @@ class MovePageForm {
$wgOut->addWikiText( wfMsg( 'talkexists' ) );
} else {
$oldTitle = Title::newFromText( $oldText );
- if ( !$oldTitle->isTalkPage() && $talkmoved != 'notalkpage' ) {
+ if ( isset( $oldTitle ) && !$oldTitle->isTalkPage() && $talkmoved != 'notalkpage' ) {
$wgOut->addWikiText( wfMsg( 'talkpagenotmoved', wfMsg( $talkmoved ) ) );
}
}