diff --git a/bin/auth_ejabberd.php b/bin/auth_ejabberd.php index 22087ed01..88e5d034c 100755 --- a/bin/auth_ejabberd.php +++ b/bin/auth_ejabberd.php @@ -51,8 +51,6 @@ * */ -use Friendica\Network\HTTPException\ForbiddenException; - if (php_sapi_name() !== 'cli') { header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden'); exit(); diff --git a/bin/console.php b/bin/console.php index 830517615..35f0b5fee 100755 --- a/bin/console.php +++ b/bin/console.php @@ -20,8 +20,6 @@ * */ -use Friendica\Network\HTTPException\ForbiddenException; - if (php_sapi_name() !== 'cli') { header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden'); exit(); diff --git a/bin/daemon.php b/bin/daemon.php index 78eb74001..7d4945fe0 100755 --- a/bin/daemon.php +++ b/bin/daemon.php @@ -23,8 +23,6 @@ * This script was taken from http://php.net/manual/en/function.pcntl-fork.php */ -use Friendica\Network\HTTPException\ForbiddenException; - if (php_sapi_name() !== 'cli') { header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden'); exit(); diff --git a/bin/testargs.php b/bin/testargs.php index dbfd05a13..55197f63a 100644 --- a/bin/testargs.php +++ b/bin/testargs.php @@ -26,8 +26,6 @@ * */ -use Friendica\Network\HTTPException\ForbiddenException; - if (php_sapi_name() !== 'cli') { header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden'); exit(); diff --git a/bin/wait-for-connection b/bin/wait-for-connection index 35560feb2..f0fd8cc60 100755 --- a/bin/wait-for-connection +++ b/bin/wait-for-connection @@ -24,10 +24,9 @@ * Usage: php bin/wait-for-connection {HOST} {PORT} [{TIMEOUT}] */ -use Friendica\Network\HTTPException\ForbiddenException; - if (php_sapi_name() !== 'cli') { - throw new ForbiddenException(); + header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden'); + exit(); } $timeout = 60; diff --git a/bin/worker.php b/bin/worker.php index ad70bb176..2fe03cb4b 100755 --- a/bin/worker.php +++ b/bin/worker.php @@ -21,8 +21,6 @@ * Starts the background processing */ -use Friendica\Network\HTTPException\ForbiddenException; - if (php_sapi_name() !== 'cli') { header($_SERVER["SERVER_PROTOCOL"] . ' 403 Forbidden'); exit();