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
Remove useless StatusTest::testCanConstruct()
[lhc/web/wiklou.git]
/
maintenance
/
cleanupPreferences.php
diff --git
a/maintenance/cleanupPreferences.php
b/maintenance/cleanupPreferences.php
index
3539689
..
6e58ae9
100644
(file)
--- a/
maintenance/cleanupPreferences.php
+++ b/
maintenance/cleanupPreferences.php
@@
-19,11
+19,11
@@
*
* @file
* @author TyA <tya.wiki@gmail.com>
*
* @file
* @author TyA <tya.wiki@gmail.com>
- * @see
[[bugzilla:30976]]
+ * @see
https://phabricator.wikimedia.org/T32976
* @ingroup Maintenance
*/
* @ingroup Maintenance
*/
-require_once
( __DIR__ . '/Maintenance.php' )
;
+require_once
__DIR__ . '/Maintenance.php'
;
/**
* Maintenance script that removes hidden preferences from the database.
/**
* Maintenance script that removes hidden preferences from the database.
@@
-34,19
+34,19
@@
class CleanupPreferences extends Maintenance {
public function execute() {
global $wgHiddenPrefs;
public function execute() {
global $wgHiddenPrefs;
- $dbw =
wfG
etDB( DB_MASTER );
- $
dbw->begin(
);
- foreach( $wgHiddenPrefs as $item ) {
+ $dbw =
$this->g
etDB( DB_MASTER );
+ $
this->beginTransaction( $dbw, __METHOD__
);
+ foreach
( $wgHiddenPrefs as $item ) {
$dbw->delete(
'user_properties',
$dbw->delete(
'user_properties',
-
array( 'up_property' => $item )
,
+
[ 'up_property' => $item ]
,
__METHOD__
);
};
__METHOD__
);
};
- $
dbw->commit(
);
+ $
this->commitTransaction( $dbw, __METHOD__
);
$this->output( "Finished!\n" );
}
}
$maintClass = 'CleanupPreferences'; // Tells it to run the class
$this->output( "Finished!\n" );
}
}
$maintClass = 'CleanupPreferences'; // Tells it to run the class
-require_once
( RUN_MAINTENANCE_IF_MAIN )
;
+require_once
RUN_MAINTENANCE_IF_MAIN
;