X-Git-Url: http://git.heureux-cyclage.org/?a=blobdiff_plain;f=maintenance%2FcleanupWatchlist.php;h=64d39dd6c88565c750533be714a7192b5b5ebd0e;hb=977b389d6a6ed441891fba350c3a6e28d1f21315;hp=d8c682b1ca9cb341466d363f9e1f2fe1cdb1eb26;hpb=7489189d7c13448114963520fb383cb2c7765b1e;p=lhc%2Fweb%2Fwiklou.git diff --git a/maintenance/cleanupWatchlist.php b/maintenance/cleanupWatchlist.php index d8c682b1ca..64d39dd6c8 100644 --- a/maintenance/cleanupWatchlist.php +++ b/maintenance/cleanupWatchlist.php @@ -37,12 +37,12 @@ require_once __DIR__ . '/cleanupTable.inc'; * @ingroup Maintenance */ class WatchlistCleanup extends TableCleanup { - protected $defaultParams = array( + protected $defaultParams = [ 'table' => 'watchlist', - 'index' => array( 'wl_user', 'wl_namespace', 'wl_title' ), - 'conds' => array(), + 'index' => [ 'wl_user', 'wl_namespace', 'wl_title' ], + 'conds' => [], 'callback' => 'processRow' - ); + ]; public function __construct() { parent::__construct(); @@ -79,10 +79,10 @@ class WatchlistCleanup extends TableCleanup { if ( !$this->dryrun && $this->hasOption( 'fix' ) ) { $dbw = $this->getDB( DB_MASTER ); $dbw->delete( - 'watchlist', array( + 'watchlist', [ 'wl_user' => $row->wl_user, 'wl_namespace' => $row->wl_namespace, - 'wl_title' => $row->wl_title ), + 'wl_title' => $row->wl_title ], __METHOD__ ); @@ -95,5 +95,5 @@ class WatchlistCleanup extends TableCleanup { } } -$maintClass = "WatchlistCleanup"; +$maintClass = WatchlistCleanup::class; require_once RUN_MAINTENANCE_IF_MAIN;