mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-24 08:14:09 +00:00
Treat phpdbg as being run from the command-line
The two lualib/ustring generation scripts run independently of MediaWiki, so the new wfIsCLI() isn't usable there. Bug: T184043 Change-Id: I217657d12e16a7b76dc814be5fed03540c461e7c
This commit is contained in:
parent
a4106b391a
commit
76dbe5d804
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( PHP_SAPI !== 'cli' ) {
|
if ( PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg' ) {
|
||||||
die( "This script may only be executed from the command line.\n" );
|
die( "This script may only be executed from the command line.\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#!/usr/bin/php
|
#!/usr/bin/php
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( PHP_SAPI !== 'cli' ) {
|
if ( PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg' ) {
|
||||||
die( "This script may only be executed from the command line.\n" );
|
die( "This script may only be executed from the command line.\n" );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -10,7 +10,7 @@
|
||||||
"license-name": "GPL-2.0+ AND MIT",
|
"license-name": "GPL-2.0+ AND MIT",
|
||||||
"type": "parserhook",
|
"type": "parserhook",
|
||||||
"requires": {
|
"requires": {
|
||||||
"MediaWiki": ">=1.30.0"
|
"MediaWiki": ">=1.31.0"
|
||||||
},
|
},
|
||||||
"APIModules": {
|
"APIModules": {
|
||||||
"scribunto-console": "ApiScribuntoConsole"
|
"scribunto-console": "ApiScribuntoConsole"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( PHP_SAPI !== 'cli' ) {
|
if ( !wfIsCLI() ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
if ( PHP_SAPI !== 'cli' ) {
|
if ( !wfIsCLI() ) {
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue