Merge "Expose thumbnail file to extensions"
[lhc/web/wiklou.git] / maintenance / language / langmemusage.php
index 2323638..32cfcd7 100644 (file)
@@ -1,7 +1,6 @@
 <?php
 /**
- * Dumb program that tries to get the memory usage
- * for each language file.
+ * Dumb program that tries to get the memory usage for each language file.
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
  * http://www.gnu.org/copyleft/gpl.html
  *
+ * @file
  * @ingroup MaintenanceLanguage
  */
 
 /** This is a command line script */
-require_once( __DIR__ . '/../Maintenance.php' );
-require_once( __DIR__ . '/languages.inc' );
+require_once __DIR__ . '/../Maintenance.php';
+require_once __DIR__ . '/languages.inc';
 
+/**
+ * Maintenance script that tries to get the memory usage for each language file.
+ *
+ * @ingroup MaintenanceLanguage
+ */
 class LangMemUsage extends Maintenance {
 
        public function __construct() {
@@ -34,14 +39,15 @@ class LangMemUsage extends Maintenance {
        }
 
        public function execute() {
-               if ( !function_exists( 'memory_get_usage' ) )
+               if ( !function_exists( 'memory_get_usage' ) ) {
                        $this->error( "You must compile PHP with --enable-memory-limit", true );
+               }
 
-               $langtool = new languages();
+               $langtool = new Languages();
                $memlast = $memstart = memory_get_usage();
 
                $this->output( "Base memory usage: $memstart\n" );
-       
+
                foreach ( $langtool->getLanguages() as $langcode ) {
                        Language::factory( $langcode );
                        $memstep = memory_get_usage();
@@ -56,4 +62,4 @@ class LangMemUsage extends Maintenance {
 }
 
 $maintClass = "LangMemUsage";
-require_once( RUN_MAINTENANCE_IF_MAIN );
+require_once RUN_MAINTENANCE_IF_MAIN;