blob: af5d9b2f03c930ecc458da1de14fbbbe5ca108d1 (
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
|
<?php
/**
* This script is used to clear the interwiki links for ALL languages in
* memcached.
* @addtogroup 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";
|