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
Make LocalisationCache a service
[lhc/web/wiklou.git]
/
maintenance
/
rebuildImages.php
diff --git
a/maintenance/rebuildImages.php
b/maintenance/rebuildImages.php
index
dfce202
..
df2ab04
100644
(file)
--- a/
maintenance/rebuildImages.php
+++ b/
maintenance/rebuildImages.php
@@
-41,12
+41,32
@@
use Wikimedia\Rdbms\IMaintainableDatabase;
* @ingroup Maintenance
*/
class ImageBuilder extends Maintenance {
* @ingroup Maintenance
*/
class ImageBuilder extends Maintenance {
-
/**
* @var IMaintainableDatabase
*/
protected $dbw;
/**
* @var IMaintainableDatabase
*/
protected $dbw;
+ /** @var bool */
+ private $dryrun;
+
+ /** @var LocalRepo|null */
+ private $repo;
+
+ /** @var int */
+ private $updated;
+
+ /** @var int */
+ private $processed;
+
+ /** @var int */
+ private $count;
+
+ /** @var int */
+ private $startTime;
+
+ /** @var string */
+ private $table;
+
function __construct() {
parent::__construct();
function __construct() {
parent::__construct();
@@
-76,10
+96,10
@@
class ImageBuilder extends Maintenance {
}
/**
}
/**
- * @return
File
Repo
+ * @return
Local
Repo
*/
function getRepo() {
*/
function getRepo() {
- if (
!isset( $this->repo )
) {
+ if (
$this->repo === null
) {
$this->repo = RepoGroup::singleton()->getLocalRepo();
}
$this->repo = RepoGroup::singleton()->getLocalRepo();
}
@@
-91,6
+111,10
@@
class ImageBuilder extends Maintenance {
$this->buildOldImage();
}
$this->buildOldImage();
}
+ /**
+ * @param int $count
+ * @param string $table
+ */
function init( $count, $table ) {
$this->processed = 0;
$this->updated = 0;
function init( $count, $table ) {
$this->processed = 0;
$this->updated = 0;
@@
-203,7
+227,8
@@
class ImageBuilder extends Maintenance {
$filename = $altname;
$this->output( "Estimating transcoding... $altname\n" );
} else {
$filename = $altname;
$this->output( "Estimating transcoding... $altname\n" );
} else {
- # @todo FIXME: create renameFile()
+ // @fixme create renameFile()
+ // @phan-suppress-next-line PhanUndeclaredMethod See comment above...
$filename = $this->renameFile( $filename );
}
}
$filename = $this->renameFile( $filename );
}
}