Followup r87225
[lhc/web/wiklou.git] / maintenance / fixSlaveDesync.php
index 9605e16..fe89294 100644 (file)
@@ -27,9 +27,9 @@ class FixSlaveDesync extends Maintenance {
        }
 
        public function getDbType() {
-               return self::DB_ADMIN;
+               return Maintenance::DB_ADMIN;
        }
-       
+
        public function execute() {
                $this->slaveIndexes = array();
                for ( $i = 1; $i < wfGetLB()->getServerCount(); $i++ ) {
@@ -41,8 +41,6 @@ class FixSlaveDesync extends Maintenance {
                if ( $this->hasArg() ) {
                        $this->desyncFixPage( $this->getArg() );
                } else {
-                       $dbw = wfGetDB( DB_MASTER );
-                       $maxPage = $dbw->selectField( 'page', 'MAX(page_id)', false, __METHOD__ );
                        $corrupt = $this->findPageLatestCorruption();
                        foreach ( $corrupt as $id => $dummy ) {
                                $this->desyncFixPage( $id );
@@ -206,4 +204,4 @@ class FixSlaveDesync extends Maintenance {
 }
 
 $maintClass = "FixSlaveDesync";
-require_once( DO_MAINTENANCE );
+require_once( RUN_MAINTENANCE_IF_MAIN );