commit live hack
authorBrion Vibber <brion@users.mediawiki.org>
Tue, 31 Oct 2006 16:58:39 +0000 (16:58 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Tue, 31 Oct 2006 16:58:39 +0000 (16:58 +0000)
maintenance/purgeList.php [new file with mode: 0644]

diff --git a/maintenance/purgeList.php b/maintenance/purgeList.php
new file mode 100644 (file)
index 0000000..64f425a
--- /dev/null
@@ -0,0 +1,28 @@
+<?php
+
+require_once( "commandLine.inc" );
+
+$stdin = fopen( "php://stdin", "rt" );
+$urls = array();
+
+while( !feof( $stdin ) ) {
+       $page = trim( fgets( $stdin ) );
+       if( $page !== '' ) {
+               $title = Title::newFromText( $page );
+               if( $title ) {
+                       $url = $title->getFullUrl();
+                       echo "$url\n";
+                       $urls[] = $url;
+               } else {
+                       echo "(Invalid title '$page')\n";
+               }
+       }
+}
+
+echo "Purging " . count( $urls ) . " urls...\n";
+$u = new SquidUpdate( $urls );
+$u->doUpdate();
+
+echo "Done!\n";
+
+?>
\ No newline at end of file