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
Services: Convert PasswordReset's static to a const now HHVM is gone
[lhc/web/wiklou.git]
/
maintenance
/
populateCategory.php
diff --git
a/maintenance/populateCategory.php
b/maintenance/populateCategory.php
index
87a4699
..
508960d
100644
(file)
--- a/
maintenance/populateCategory.php
+++ b/
maintenance/populateCategory.php
@@
-71,7
+71,7
@@
TEXT
public function execute() {
$begin = $this->getOption( 'begin', '' );
$throttle = $this->getOption( 'throttle', 0 );
public function execute() {
$begin = $this->getOption( 'begin', '' );
$throttle = $this->getOption( 'throttle', 0 );
- $force = $this->
getOption( 'force', false
);
+ $force = $this->
hasOption( 'force'
);
$dbw = $this->getDB( DB_MASTER );
$dbw = $this->getDB( DB_MASTER );
@@
-93,9
+93,9
@@
TEXT
$throttle = intval( $throttle );
if ( $begin !== '' ) {
$throttle = intval( $throttle );
if ( $begin !== '' ) {
- $where =
'cl_to > ' . $dbw->addQuotes( $begin )
;
+ $where =
[ 'cl_to > ' . $dbw->addQuotes( $begin ) ]
;
} else {
} else {
- $where =
null
;
+ $where =
[ '1 = 1' ]
;
}
$i = 0;
}
$i = 0;
@@
-133,22
+133,16
@@
TEXT
usleep( $throttle * 1000 );
}
usleep( $throttle * 1000 );
}
-
if (
$dbw->insert(
+ $dbw->insert(
'updatelog',
[ 'ul_key' => 'populate category' ],
__METHOD__,
'updatelog',
[ 'ul_key' => 'populate category' ],
__METHOD__,
- 'IGNORE'
- ) ) {
- $this->output( "Category population complete.\n" );
-
- return true;
- } else {
- $this->output( "Could not insert category population row.\n" );
+ [ 'IGNORE' ]
+ );
- return false;
- }
+ return true;
}
}
}
}
-$maintClass =
"PopulateCategory"
;
+$maintClass =
PopulateCategory::class
;
require_once RUN_MAINTENANCE_IF_MAIN;
require_once RUN_MAINTENANCE_IF_MAIN;