Merge "Make a single colon an invalid title in php and js"
[lhc/web/wiklou.git] / maintenance / pruneFileCache.php
index 7828049..01bd09a 100644 (file)
@@ -21,7 +21,7 @@
  * @ingroup Maintenance
  */
 
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once __DIR__ . '/Maintenance.php';
 
 /**
  * Maintenance script that prunes file cache for pages, objects, resources, etc.
@@ -95,8 +95,8 @@ class PruneFileCache extends Maintenance {
                                        // Sanity check the file extension against known cache types
                                        if ( $mts < $this->minSurviveTimestamp
                                                && preg_match( '/\.(?:html|cache)(?:\.gz)?$/', $file )
-                                               && unlink( $path ) )
-                                       {
+                                               && unlink( $path )
+                                       {
                                                $daysOld = round( ( $tsNow - $mts ) / 86400, 2 );
                                                $this->output( "Deleted `$path` [days=$daysOld]\n" );
                                        }
@@ -108,4 +108,4 @@ class PruneFileCache extends Maintenance {
 }
 
 $maintClass = "PruneFileCache";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;