Merge "Add MediaWikiTestCase::checkHasDiff3 and use it"
[lhc/web/wiklou.git] / maintenance / rebuildLocalisationCache.php
index 5915a6b..83849de 100644 (file)
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @ingroup Maintenance
  */
 
-require_once( dirname( __FILE__ ) . '/Maintenance.php' );
+require_once( __DIR__ . '/Maintenance.php' );
 
+/**
+ * Maintenance script to rebuild the localisation cache.
+ *
+ * @ingroup Maintenance
+ */
 class RebuildLocalisationCache extends Maintenance {
        public function __construct() {
                parent::__construct();
                $this->mDescription = "Rebuild the localisation cache";
                $this->addOption( 'force', 'Rebuild all files, even ones not out of date' );
                $this->addOption( 'threads', 'Fork more than one thread', false, true );
-               $this->addOption( 'outdir', 'Override the output directory (normally $wgCacheDirectory)', 
+               $this->addOption( 'outdir', 'Override the output directory (normally $wgCacheDirectory)',
                        false, true );
        }
 
        public function memoryLimit() {
+               if ( $this->hasOption( 'memory-limit' ) ) {
+                       return parent::memoryLimit();
+               }
                return '1000M';
        }