blob: 97869728de34b4d025985fc93335bf6e98350312 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
<?php
/**
* This script is used to clear the interwiki links for ALL languages in
* memcached.
* @package MediaWiki
* @subpackage Maintenance
*/
/** */
require_once('commandLine.inc');
$dbr =& wfGetDB( DB_SLAVE );
$res = $dbr->select( 'interwiki', array( 'iw_prefix' ), false );
$prefixes = array();
while ( $row = $dbr->fetchObject( $res ) ) {
$prefixes[] = $row->iw_prefix;
}
foreach ( $wgLocalDatabases as $db ) {
print "$db ";
foreach ( $prefixes as $prefix ) {
$wgMemc->delete("$db:interwiki:$prefix");
}
}
print "\n";
?>
|