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
SQLite: Split actor and comment filearchive updates to a separate file
[lhc/web/wiklou.git]
/
maintenance
/
populateInterwiki.php
diff --git
a/maintenance/populateInterwiki.php
b/maintenance/populateInterwiki.php
index
5d32b99
..
1b05e1e
100644
(file)
--- a/
maintenance/populateInterwiki.php
+++ b/
maintenance/populateInterwiki.php
@@
-33,11
+33,6
@@
class PopulateInterwiki extends Maintenance {
*/
private $source;
*/
private $source;
- /**
- * @var BagOStuff
- */
- private $cache;
-
public function __construct() {
parent::__construct();
public function __construct() {
parent::__construct();
@@
-61,11
+56,9
@@
TEXT
}
public function execute() {
}
public function execute() {
- $force = $this->
getOption( 'force', false
);
+ $force = $this->
hasOption( 'force'
);
$this->source = $this->getOption( 'source', 'https://en.wikipedia.org/w/api.php' );
$this->source = $this->getOption( 'source', 'https://en.wikipedia.org/w/api.php' );
- $this->cache = wfGetMainCache();
-
$data = $this->fetchLinks();
if ( $data === false ) {
$data = $this->fetchLinks();
if ( $data === false ) {
@@
-136,7
+129,7
@@
TEXT
__METHOD__
);
__METHOD__
);
- if ( !
$row ) {
+ if ( !$row ) {
$dbw->insert(
'interwiki',
[
$dbw->insert(
'interwiki',
[
@@
-149,7
+142,7
@@
TEXT
);
}
);
}
-
$this->clearCacheEntry
( $prefix );
+
Interwiki::invalidateCache
( $prefix );
}
$this->output( "Interwiki links are populated.\n" );
}
$this->output( "Interwiki links are populated.\n" );
@@
-157,14
+150,6
@@
TEXT
return true;
}
return true;
}
- /**
- * @param string $prefix
- */
- private function clearCacheEntry( $prefix ) {
- $key = wfMemcKey( 'interwiki', $prefix );
- $this->cache->delete( $key );
- }
-
}
$maintClass = PopulateInterwiki::class;
}
$maintClass = PopulateInterwiki::class;