another function for cli scripts

git-svn-id: file:///home/shish/svn/shimmie2/trunk@893 7f39781d-f577-437e-ae19-be835c7a54ca
This commit is contained in:
shish 2008-06-09 11:21:11 +00:00
parent 89a250b7f7
commit 8d547d0ad5

View File

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