diff options
author | Friendika <info@friendika.com> | 2011-08-29 00:59:44 -0700 |
---|---|---|
committer | Friendika <info@friendika.com> | 2011-08-29 00:59:44 -0700 |
commit | 177e0e15d73fedd3c58a9d5f9cb7f509bd1da07b (patch) | |
tree | 144a73a9c76d76f604861f63c934d67ee54e4c28 /include/notifier.php | |
parent | 391330d95f4b59aaca60ee7e954eaa9e7d2a20c0 (diff) | |
download | volse-hubzilla-177e0e15d73fedd3c58a9d5f9cb7f509bd1da07b.tar.gz volse-hubzilla-177e0e15d73fedd3c58a9d5f9cb7f509bd1da07b.tar.bz2 volse-hubzilla-177e0e15d73fedd3c58a9d5f9cb7f509bd1da07b.zip |
allow zero delivery interval on dedicated servers
Diffstat (limited to 'include/notifier.php')
-rw-r--r-- | include/notifier.php | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/include/notifier.php b/include/notifier.php index aa186317f..1c71538d7 100644 --- a/include/notifier.php +++ b/include/notifier.php @@ -384,9 +384,7 @@ function notifier_run($argv, $argc){ require_once('include/salmon.php'); - $interval = intval(get_config('system','delivery_interval')); - if(! $interval) - $interval = 2; + $interval = ((get_config('system','delivery_interval') === false) ? 2 : intval(get_config('system','delivery_interval'))); // delivery loop @@ -411,7 +409,8 @@ function notifier_run($argv, $argc){ if((! $mail) && (! $fsuggest) && (! $followup)) { proc_run('php','include/delivery.php',$cmd,$item_id,$contact['id']); - @time_sleep_until(microtime(true) + (float) $interval); + if($interval) + @time_sleep_until(microtime(true) + (float) $interval); } $deliver_status = 0; @@ -661,7 +660,8 @@ function notifier_run($argv, $argc){ if((! $mail) && (! $fsuggest) && (! $followup)) { logger('notifier: delivery agent: ' . $rr['name'] . ' ' . $rr['id']); proc_run('php','include/delivery.php',$cmd,$item_id,$rr['id']); - @time_sleep_until(microtime(true) + (float) $interval); + if($interval) + @time_sleep_until(microtime(true) + (float) $interval); } } } |