* @ingroup Maintenance
*/
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
/**
* Maintenance script to clear the cache of interwiki prefixes for all local wikis.
public function __construct() {
parent::__construct();
- $this->mDescription = "Clear all interwiki links for all languages from the cache";
+ $this->addDescription( 'Clear all interwiki links for all languages from the cache' );
}
public function execute() {
global $wgLocalDatabases, $wgMemc;
- $dbr = wfGetDB( DB_SLAVE );
- $res = $dbr->select( 'interwiki', array( 'iw_prefix' ), false );
- $prefixes = array();
+ $dbr = $this->getDB( DB_SLAVE );
+ $res = $dbr->select( 'interwiki', [ 'iw_prefix' ], false );
+ $prefixes = [];
foreach ( $res as $row ) {
$prefixes[] = $row->iw_prefix;
}
}
$maintClass = "ClearInterwikiCache";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;