Allow cronjob.php to be called from web.

This commit is contained in:
Neck 2013-05-21 19:18:19 +01:00
parent 9f896babe5
commit 1bd79b27d6

View File

@ -13,6 +13,12 @@ if (is_console()) {
$limit = empty($options['limit']) ? LIMIT_ALL : (int)$options['limit'];
$update_interval = empty($options['update-interval']) ? null : (int)$options['update-interval'];
$call_interval = empty($options['call-interval']) ? null : (int)$options['call-interval'];
} else {
$limit = empty($_GET['limit']) ? LIMIT_ALL : (int)$_GET['limit'];
$update_interval = empty($_GET['update-interval']) ? null : (int)$_GET['update-interval'];
$call_interval = empty($_GET['call-interval']) ? null : (int)$_GET['call-interval'];
}
if ($update_interval !== null && $call_interval !== null && $limit === LIMIT_ALL && $update_interval >= $call_interval) {
@ -21,4 +27,3 @@ if (is_console()) {
}
Model\update_feeds($limit);
}