From 0044736e0f28a5eb648fe48c053b5198506cf708 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Tue, 16 Sep 2008 21:47:08 +0000 Subject: [PATCH] - Preserve existing times when working with an existing job schedule - Preserve values of 0 (previously set to */1) --- phpgwapi/inc/class.asyncservice.inc.php | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.asyncservice.inc.php b/phpgwapi/inc/class.asyncservice.inc.php index 2084e2d3e1..bb7c3aded2 100644 --- a/phpgwapi/inc/class.asyncservice.inc.php +++ b/phpgwapi/inc/class.asyncservice.inc.php @@ -172,8 +172,11 @@ class asyncservice if ($this->debug) { echo "

n=$n, $u: isset(times[$u]="; print_r($times[$u]); echo ")=".(isset($times[$u])?'True':'False')."

\n"; } if (isset($times[$u])) { - $time = explode(',',$times[$u]); - + if(is_array($times[$u])) { + $time = array_keys($times[$u]); + } else { + $time = explode(',',$times[$u]); + } $times[$u] = array(); foreach($time as $t) @@ -195,7 +198,7 @@ class asyncservice } else { - if ($t == '*') $t = '*/1'; + if ((string)$t == '*') $t = '*/1'; list($one,$inc) = $arr = explode('/',$t);