diff --git a/bin/auth_ejabberd.php b/bin/auth_ejabberd.php index 22087ed017..88e5d034cb 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 8305176157..35f0b5feef 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 78eb74001d..7d4945fe03 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 dbfd05a130..55197f63a3 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 35560feb2a..f0fd8cc60f 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 ad70bb176a..2fe03cb4b2 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();