dépôts
/
lhc
/
web
/
wiklou.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
74e6ce4
)
Also check if 'debug_backtrace' is disabled in Maintenance::shouldExecute()
author
Alexandre Emsenhuber
<mediawiki@emsenhuber.ch>
Wed, 25 Jun 2014 20:39:58 +0000
(22:39 +0200)
committer
Aaron Schulz
<aschulz@wikimedia.org>
Thu, 26 Jun 2014 00:06:32 +0000
(
00:06
+0000)
And execute the script if $wgCommandLineMode is true. Otherwise scripts
never get executed.
Change-Id: I609d859b616905ab44a060a861be500609e5a9f0
maintenance/Maintenance.php
patch
|
blob
|
history
diff --git
a/maintenance/Maintenance.php
b/maintenance/Maintenance.php
index
e316d9e
..
ffb07eb
100644
(file)
--- a/
maintenance/Maintenance.php
+++ b/
maintenance/Maintenance.php
@@
-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 ) {