diff --git a/core/util.inc.php b/core/util.inc.php index e1372eb2..6a625727 100644 --- a/core/util.inc.php +++ b/core/util.inc.php @@ -128,6 +128,14 @@ EOD; } } +function check_cli() { + if(isset($_SERVER['REMOTE_ADDR'])) { + print "This script is to be run from the command line only."; + exit; + } + $_SERVER['REMOTE_ADDR'] = "127.0.0.1"; +} + function get_thumbnail_size($orig_width, $orig_height) { global $config;