commit live hack
[lhc/web/wiklou.git] / maintenance / purgeList.php
1 <?php
2
3 require_once( "commandLine.inc" );
4
5 $stdin = fopen( "php://stdin", "rt" );
6 $urls = array();
7
8 while( !feof( $stdin ) ) {
9 $page = trim( fgets( $stdin ) );
10 if( $page !== '' ) {
11 $title = Title::newFromText( $page );
12 if( $title ) {
13 $url = $title->getFullUrl();
14 echo "$url\n";
15 $urls[] = $url;
16 } else {
17 echo "(Invalid title '$page')\n";
18 }
19 }
20 }
21
22 echo "Purging " . count( $urls ) . " urls...\n";
23 $u = new SquidUpdate( $urls );
24 $u->doUpdate();
25
26 echo "Done!\n";
27
28 ?>