MovePage: Properly return errors
authorKunal Mehta <legoktm@gmail.com>
Sat, 11 Oct 2014 01:39:24 +0000 (18:39 -0700)
committerKunal Mehta <legoktm@gmail.com>
Sat, 11 Oct 2014 05:52:13 +0000 (22:52 -0700)
Probably a copy-paste mistake when converting this function
to use Status instead of error arrays.

Change-Id: I796fc66ee637dd7d914a4182fe56992e59b90aba

includes/MovePage.php

index 5c9490b..79095e9 100644 (file)
@@ -69,14 +69,14 @@ class MovePage {
                $oldid = $this->oldTitle->getArticleID();
 
                if ( strlen( $this->newTitle->getDBkey() ) < 1 ) {
-                       $errors[] = array( 'articleexists' );
+                       $status->fatal( 'articleexists' );
                }
                if (
                        ( $this->oldTitle->getDBkey() == '' ) ||
                        ( !$oldid ) ||
                        ( $this->newTitle->getDBkey() == '' )
                ) {
-                       $errors[] = array( 'badarticleerror' );
+                       $status->fatal( 'badarticleerror' );
                }
 
                // Content model checks