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:
Kunal Mehta 2018-01-10 19:46:00 +05:30
parent a4106b391a
commit 76dbe5d804
5 changed files with 5 additions and 5 deletions

View file

@ -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" );
}

View file

@ -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" );
}

View file

@ -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"

View file

@ -1,6 +1,6 @@
<?php
if ( PHP_SAPI !== 'cli' ) {
if ( !wfIsCLI() ) {
exit;
}

View file

@ -1,6 +1,6 @@
<?php
if ( PHP_SAPI !== 'cli' ) {
if ( !wfIsCLI() ) {
exit;
}