Merge "Include Postgres tables and maintenance scripts for Change I23c47c2c"
[lhc/web/wiklou.git] / maintenance / purgeList.php
index f1452bc..58fe880 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @ingroup Maintenance
  */
 
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
 
+/**
+ * Maintenance script that sends purge requests for listed pages to squid.
+ *
+ * @ingroup Maintenance
+ */
 class PurgeList extends Maintenance {
        public function __construct() {
                parent::__construct();
@@ -80,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