forked from extern/egroupware
fix async jobs with scalar data (strings, int) got quoted over and over again
This commit is contained in:
parent
f14d3b4c8b
commit
e2d6d75607
@ -1,6 +1,6 @@
|
|||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* eGgroupWare admin - Timed Asynchron Services
|
* EGgroupware admin - Timed Asynchron Services
|
||||||
*
|
*
|
||||||
* @link http://www.egroupware.org
|
* @link http://www.egroupware.org
|
||||||
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
|
||||||
@ -59,7 +59,7 @@ class uiasyncservice
|
|||||||
{
|
{
|
||||||
echo '<p><b>'.lang("You have no email address for your user set !!!")."</b></p>\n";
|
echo '<p><b>'.lang("You have no email address for your user set !!!")."</b></p>\n";
|
||||||
}
|
}
|
||||||
elseif (!$async->set_timer($times,'test','admin.uiasyncservice.test',(array)$GLOBALS['egw_info']['user']['account_email']))
|
elseif (!$async->set_timer($times,'test','admin.uiasyncservice.test',$GLOBALS['egw_info']['user']['account_email']))
|
||||||
{
|
{
|
||||||
echo '<p><b>'.lang("Error setting timer, wrong syntax or maybe there's one already running !!!")."</b></p>\n";
|
echo '<p><b>'.lang("Error setting timer, wrong syntax or maybe there's one already running !!!")."</b></p>\n";
|
||||||
}
|
}
|
||||||
@ -93,11 +93,7 @@ class uiasyncservice
|
|||||||
|
|
||||||
if (isset($_POST['asyncservice']) && $_POST['asyncservice'] != $GLOBALS['egw_info']['server']['asyncservice'])
|
if (isset($_POST['asyncservice']) && $_POST['asyncservice'] != $GLOBALS['egw_info']['server']['asyncservice'])
|
||||||
{
|
{
|
||||||
$config =& CreateObject('phpgwapi.config','phpgwapi');
|
config::save_value('asyncservice', $GLOBALS['egw_info']['server']['asyncservice']=$_POST['asyncservice'], 'phpgwapi');
|
||||||
$config->read_repository();
|
|
||||||
$config->value('asyncservice',$GLOBALS['egw_info']['server']['asyncservice']=$_POST['asyncservice']);
|
|
||||||
$config->save_repository();
|
|
||||||
unset($config);
|
|
||||||
}
|
}
|
||||||
if (!$async->only_fallback)
|
if (!$async->only_fallback)
|
||||||
{
|
{
|
||||||
@ -189,7 +185,6 @@ class uiasyncservice
|
|||||||
}
|
}
|
||||||
echo '<p><input type="submit" name="update" value="'.lang('Update').'"></p>'."\n";
|
echo '<p><input type="submit" name="update" value="'.lang('Update').'"></p>'."\n";
|
||||||
echo "</form>\n";
|
echo "</form>\n";
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function test($to)
|
function test($to)
|
||||||
|
@ -1606,9 +1606,9 @@ function json_php_unserialize($str, $allow_not_serialized=false)
|
|||||||
{
|
{
|
||||||
return $arr;
|
return $arr;
|
||||||
}
|
}
|
||||||
if (!$allow_not_serialized || $str[0] == '[' || $str[0] == '{')
|
if (!$allow_not_serialized || $str[0] == '[' || $str[0] == '{' || $str[0] == '"' || $str === 'null' || ($val = json_decode($str)) !== null)
|
||||||
{
|
{
|
||||||
return json_decode($str, true);
|
return isset($val) ? $val : json_decode($str, true);
|
||||||
}
|
}
|
||||||
return $str;
|
return $str;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user