updateSpecialPages: Get rid of dead SpecialPage::getFile() code
authorKunal Mehta <legoktm@gmail.com>
Tue, 27 Oct 2015 16:05:36 +0000 (09:05 -0700)
committerKunal Mehta <legoktm@gmail.com>
Tue, 27 Oct 2015 16:37:05 +0000 (09:37 -0700)
That method doesn't exist any more.

Change-Id: I35eb8e2d7e77a6fcb17187356bafd92cfede6b40

maintenance/updateSpecialPages.php

index d67ef6b..c800664 100644 (file)
@@ -71,11 +71,9 @@ class UpdateSpecialPages extends Maintenance {
                        if ( $specialObj instanceof QueryPage ) {
                                $queryPage = $specialObj;
                        } else {
-                               if ( !class_exists( $class ) ) {
-                                       $file = $specialObj->getFile();
-                                       require_once $file;
-                               }
-                               $queryPage = new $class;
+                               $class = get_class( $specialObj );
+                               $this->error( "$class is not an instance of QueryPage.\n", 1 );
+                               die;
                        }
 
                        if ( !$this->hasOption( 'only' ) || $this->getOption( 'only' ) == $queryPage->getName() ) {