mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Scribunto
synced 2024-11-24 00:05:00 +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
|
||||
<?php
|
||||
|
||||
if ( PHP_SAPI !== 'cli' ) {
|
||||
if ( PHP_SAPI !== 'cli' && PHP_SAPI !== 'phpdbg' ) {
|
||||
die( "This script may only be executed from the command line.\n" );
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/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" );
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@
|
|||
"license-name": "GPL-2.0+ AND MIT",
|
||||
"type": "parserhook",
|
||||
"requires": {
|
||||
"MediaWiki": ">=1.30.0"
|
||||
"MediaWiki": ">=1.31.0"
|
||||
},
|
||||
"APIModules": {
|
||||
"scribunto-console": "ApiScribuntoConsole"
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
if ( PHP_SAPI !== 'cli' ) {
|
||||
if ( !wfIsCLI() ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
|
||||
if ( PHP_SAPI !== 'cli' ) {
|
||||
if ( !wfIsCLI() ) {
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue