* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script that sends purge requests for listed pages to squid.
if ( $this->hasOption( 'all' ) ) {
$this->purgeNamespace( false );
} elseif ( $this->hasOption( 'namespace' ) ) {
- $this->purgeNamespace( intval( $this->getOption( 'namespace') ) );
+ $this->purgeNamespace( intval( $this->getOption( 'namespace' ) ) );
} else {
$this->doPurge();
}
} elseif ( $page !== '' ) {
$title = Title::newFromText( $page );
if ( $title ) {
- $url = $title->getInternalUrl();
+ $url = $title->getInternalURL();
$this->output( "$url\n" );
$urls[] = $url;
if ( $this->getOption( 'purge' ) ) {
}
}
}
- $this->output( "Purging " . count( $urls ). " urls\n" );
+ $this->output( "Purging " . count( $urls ) . " urls\n" );
$this->sendPurgeRequest( $urls );
}
$conds = array( 'page_namespace' => $namespace );
}
while ( true ) {
- $res = $dbr->select( 'page',
+ $res = $dbr->select( 'page',
array( 'page_id', 'page_namespace', 'page_title' ),
$conds + array( 'page_id > ' . $dbr->addQuotes( $startId ) ),
__METHOD__,
$urls = array();
foreach ( $res as $row ) {
$title = Title::makeTitle( $row->page_namespace, $row->page_title );
- $url = $title->getInternalUrl();
+ $url = $title->getInternalURL();
$urls[] = $url;
$startId = $row->page_id;
}
}
} else {
if ( $this->hasOption( 'verbose' ) ) {
- $this->output( implode( "\n", $urls ) . "\n" );
+ $this->output( implode( "\n", $urls ) . "\n" );
}
$u = new SquidUpdate( $urls );
$u->doUpdate();
}
$maintClass = "PurgeList";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;