mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-21 23:43:17 +01:00
change cli detection to use php_sapi_name()
This commit is contained in:
parent
8105242434
commit
892500fee3
@ -13,7 +13,7 @@
|
||||
|
||||
chdir(dirname(__FILE__)); // to enable our relative pathes to work
|
||||
|
||||
if (isset($_SERVER['HTTP_HOST'])) // security precaution: forbit calling admin-cli as web-page
|
||||
if (php_sapi_name() !== 'cli') // security precaution: forbit calling admin-cli as web-page
|
||||
{
|
||||
die('<h1>admin-cli.php must NOT be called as web-page --> exiting !!!</h1>');
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
if (isset($_SERVER['HTTP_HOST'])) // security precaution: forbit calling as web-page
|
||||
if (php_sapi_name() !== 'cli') // security precaution: forbit calling as web-page
|
||||
{
|
||||
die('<h1>fix_depricated.php must NOT be called as web-page --> exiting !!!</h1>');
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
if (isset($_SERVER['HTTP_HOST'])) // security precaution: forbit calling setup-cli as web-page
|
||||
if (php_sapi_name() !== 'cli') // security precaution: forbit calling setup-cli as web-page
|
||||
{
|
||||
die('<h1>checkout-build-archives.php must NOT be called as web-page --> exiting !!!</h1>');
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
if (isset($_SERVER['HTTP_HOST'])) // security precaution: forbit calling post_install as web-page
|
||||
if (php_sapi_name() !== 'cli') // security precaution: forbit calling post_install as web-page
|
||||
{
|
||||
die('<h1>rpm_post_install.php must NOT be called as web-page --> exiting !!!</h1>');
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ chdir(dirname(__FILE__)); // to enable our relative pathes to work
|
||||
|
||||
error_reporting(error_reporting() & ~E_NOTICE);
|
||||
|
||||
if (isset($_SERVER['HTTP_HOST'])) // security precaution: forbit calling ls as web-page
|
||||
if (php_sapi_name() !== 'cli') // security precaution: forbit calling filemanager/cli.php as web-page
|
||||
{
|
||||
die('<h1>'.basename(__FILE__).' must NOT be called as web-page --> exiting !!!</h1>');
|
||||
}
|
||||
|
@ -12,7 +12,7 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
if (isset($_SERVER['HTTP_HOST'])) die("This is a commandline ONLY tool!\n");
|
||||
if (php_sapi_name() !== 'cli') die("This is a commandline ONLY tool!\n");
|
||||
|
||||
/**
|
||||
* iSchedule command line client, primary for testing and development purpose
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
chdir(dirname(__FILE__)); // to enable our relative pathes to work
|
||||
|
||||
if (isset($_SERVER['HTTP_HOST'])) // security precaution: forbit calling as web-page
|
||||
if (php_sapi_name() !== 'cli') // security precaution: forbit calling as web-page
|
||||
{
|
||||
die('<h1>setup/doc/chown.php must NOT be called as web-page --> exiting !!!</h1>');
|
||||
}
|
||||
|
@ -13,7 +13,7 @@
|
||||
|
||||
chdir(dirname(__FILE__)); // to enable our relative pathes to work
|
||||
|
||||
if (isset($_SERVER['HTTP_HOST'])) // security precaution: forbit calling setup-cli as web-page
|
||||
if (php_sapi_name() !== 'cli') // security precaution: forbit calling setup-cli as web-page
|
||||
{
|
||||
die('<h1>setup-cli.php must NOT be called as web-page --> exiting !!!</h1>');
|
||||
}
|
||||
|
@ -10,7 +10,7 @@
|
||||
* @version $Id$
|
||||
*/
|
||||
|
||||
if (isset($_SERVER['HTTP_HOST'])) die("This is a commandline ONLY tool!\n");
|
||||
if (php_sapi_name() !== 'cli') die("This is a commandline ONLY tool!\n");
|
||||
|
||||
if ($_SERVER['argc'] <= 1) die('
|
||||
Usage: ./svn-helper.php <svn-arguments>
|
||||
|
Loading…
Reference in New Issue
Block a user