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