Merge "SkinApiTemplate: Remove <span dir="auto"> for firstHeading"
[lhc/web/wiklou.git] / maintenance / purgeList.php
index 0945c9d..2e19630 100644 (file)
@@ -21,7 +21,7 @@
  * @ingroup Maintenance
  */
 
-require_once( __DIR__ . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
 
 /**
  * Maintenance script that sends purge requests for listed pages to squid.
@@ -44,14 +44,16 @@ class PurgeList extends Maintenance {
                if ( $this->hasOption( 'all' ) ) {
                        $this->purgeNamespace( false );
                } elseif ( $this->hasOption( 'namespace' ) ) {
-                       $this->purgeNamespace( intval( $this->getOption( 'namespace') ) );
+                       $this->purgeNamespace( intval( $this->getOption( 'namespace' ) ) );
                } else {
                        $this->doPurge();
                }
                $this->output( "Done!\n" );
        }
 
-       /** Purge URL coming from stdin */
+       /**
+        * Purge URL coming from stdin
+        */
        private function doPurge() {
                $stdin = $this->getStdin();
                $urls = array();
@@ -78,7 +80,11 @@ class PurgeList extends Maintenance {
                $this->sendPurgeRequest( $urls );
        }
 
-       /** Purge a namespace or all pages */
+       /**
+        * Purge a namespace or all pages
+        *
+        * @param int|bool $namespace
+        */
        private function purgeNamespace( $namespace = false ) {
                $dbr = wfGetDB( DB_SLAVE );
                $startId = 0;
@@ -114,7 +120,7 @@ class PurgeList extends Maintenance {
 
        /**
         * Helper to purge an array of $urls
-        * @param $urls array List of URLS to purge from squids
+        * @param array $urls List of URLS to purge from squids
         */
        private function sendPurgeRequest( $urls ) {
                if ( $this->hasOption( 'delay' ) ) {
@@ -129,14 +135,13 @@ class PurgeList extends Maintenance {
                        }
                } else {
                        if ( $this->hasOption( 'verbose' ) ) {
-                               $this->output( implode( "\n", $urls ) . "\n"  );
+                               $this->output( implode( "\n", $urls ) . "\n" );
                        }
                        $u = new SquidUpdate( $urls );
                        $u->doUpdate();
                }
        }
-
 }
 
 $maintClass = "PurgeList";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;