Show an error when asking to move a non-existant page. Patch by [[he:User:Agbad]].
authorRotem Liss <rotem@users.mediawiki.org>
Fri, 16 May 2008 11:57:32 +0000 (11:57 +0000)
committerRotem Liss <rotem@users.mediawiki.org>
Fri, 16 May 2008 11:57:32 +0000 (11:57 +0000)
includes/SpecialMovepage.php
languages/messages/MessagesEn.php
languages/messages/MessagesHe.php
maintenance/language/messages.inc

index 33f043d..827b9cb 100644 (file)
@@ -73,6 +73,10 @@ class MovePageForm {
                        $wgOut->showErrorPage( 'notargettitle', 'notargettext' );
                        return;
                }
+               if( !$ot->exists() ) {
+                       $wgOut->showErrorPage( 'nopagetitle', 'nopagetext' );
+                       return;
+               }
 
                $sk = $wgUser->getSkin();
 
index e86f578..b1f6e95 100644 (file)
@@ -1909,6 +1909,8 @@ A page is treated as disambiguation page if it uses a template which is linked f
 'unusedcategoriestext'            => 'The following category pages exist although no other page or category make use of them.',
 'notargettitle'                   => 'No target',
 'notargettext'                    => 'You have not specified a target page or user to perform this function on.',
+'nopagetitle'                     => 'No such target page',
+'nopagetext'                      => 'The target page you have specified does not exist.',
 'pager-newer-n'                   => '{{PLURAL:$1|newer 1|newer $1}}',
 'pager-older-n'                   => '{{PLURAL:$1|older 1|older $1}}',
 'suppress'                        => 'Oversight',
index 1ed3f9a..5088e94 100644 (file)
@@ -1571,6 +1571,8 @@ $2',
 'unusedcategoriestext'    => 'למרות שהקטגוריות הבאות קיימות, אין שום דף בו נעשה בהן שימוש.',
 'notargettitle'           => 'אין דף מטרה',
 'notargettext'            => 'לא ציינתם דף מטרה או משתמש לגביו תבוצע פעולה זו.',
+'nopagetitle'             => 'אין דף מטרה כזה',
+'nopagetext'              => 'דף המטרה שציינתם אינו קיים.',
 'pager-newer-n'           => '{{plural:$1|הבאה|$1 הבאות}}',
 'pager-older-n'           => '{{plural:$1|הקודמת|$1 הקודמות}}',
 'suppress'                => 'הסתרה',
index f34fe77..3935ec5 100644 (file)
@@ -1239,6 +1239,8 @@ $wgMessageStructure = array(
                'unusedcategoriestext',
                'notargettitle',
                'notargettext',
+               'nopagetitle',
+               'nopagetext',
                'pager-newer-n',
                'pager-older-n',
                'suppress',