Merge "Remove two unused constants from EditPage.php"
[lhc/web/wiklou.git] / maintenance / Maintenance.php
index 479030f..ffb07eb 100644 (file)
@@ -136,6 +136,13 @@ abstract class Maintenance {
         * @return bool
         */
        public static function shouldExecute() {
+               global $wgCommandLineMode;
+
+               if ( !function_exists( 'debug_backtrace' ) ) {
+                       // If someone has a better idea...
+                       return $wgCommandLineMode;
+               }
+
                $bt = debug_backtrace();
                $count = count( $bt );
                if ( $count < 2 ) {
@@ -731,7 +738,7 @@ abstract class Maintenance {
                        return;
                }
 
-               $screenWidth = 80; // TODO: Caculate this!
+               $screenWidth = 80; // TODO: Calculate this!
                $tab = "    ";
                $descWidth = $screenWidth - ( 2 * strlen( $tab ) );