(Bug 40860) make purgeRedundantText not fail on pre MW1.5 records
[lhc/web/wiklou.git] / maintenance / purgeList.php
index 049d6e3..58fe880 100644 (file)
@@ -21,7 +21,7 @@
  * @ingroup Maintenance
  */
 
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
 
 /**
  * Maintenance script that sends purge requests for listed pages to squid.
@@ -86,7 +86,7 @@ class PurgeList extends Maintenance {
                );
 
                $start   = 0;
-               $end = $dbr->numRows( $result );
+               $end = $result->numRows();
                $this->output( "Will purge $end pages from namespace $ns\n" );
 
                # Do remaining chunk