dépôts
/
lhc
/
web
/
wiklou.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge "resourceloader: Add @covers for stripBom() test"
[lhc/web/wiklou.git]
/
maintenance
/
cleanupWatchlist.php
diff --git
a/maintenance/cleanupWatchlist.php
b/maintenance/cleanupWatchlist.php
index
eb7d7b1
..
9728ac5
100644
(file)
--- a/
maintenance/cleanupWatchlist.php
+++ b/
maintenance/cleanupWatchlist.php
@@
-37,16
+37,16
@@
require_once __DIR__ . '/cleanupTable.inc';
* @ingroup Maintenance
*/
class WatchlistCleanup extends TableCleanup {
* @ingroup Maintenance
*/
class WatchlistCleanup extends TableCleanup {
- protected $defaultParams =
array(
+ protected $defaultParams =
[
'table' => 'watchlist',
'table' => 'watchlist',
- 'index' =>
array( 'wl_user', 'wl_namespace', 'wl_title' )
,
- 'conds' =>
array()
,
+ 'index' =>
[ 'wl_user', 'wl_namespace', 'wl_title' ]
,
+ 'conds' =>
[]
,
'callback' => 'processRow'
'callback' => 'processRow'
-
)
;
+
]
;
public function __construct() {
parent::__construct();
public function __construct() {
parent::__construct();
- $this->
mDescription = "Script to remove broken, unparseable titles in the Watchlist"
;
+ $this->
addDescription( 'Script to remove broken, unparseable titles in the Watchlist' )
;
$this->addOption( 'fix', 'Actually remove entries; without will only report.' );
}
$this->addOption( 'fix', 'Actually remove entries; without will only report.' );
}
@@
-77,12
+77,12
@@
class WatchlistCleanup extends TableCleanup {
private function removeWatch( $row ) {
if ( !$this->dryrun && $this->hasOption( 'fix' ) ) {
private function removeWatch( $row ) {
if ( !$this->dryrun && $this->hasOption( 'fix' ) ) {
- $dbw =
wfG
etDB( DB_MASTER );
+ $dbw =
$this->g
etDB( DB_MASTER );
$dbw->delete(
$dbw->delete(
- 'watchlist',
array(
+ 'watchlist',
[
'wl_user' => $row->wl_user,
'wl_namespace' => $row->wl_namespace,
'wl_user' => $row->wl_user,
'wl_namespace' => $row->wl_namespace,
- 'wl_title' => $row->wl_title
)
,
+ 'wl_title' => $row->wl_title
]
,
__METHOD__
);
__METHOD__
);