Author: ralfbecker
New Revision: 49058
URL: http://svn.stylite.de/viewvc/egroupware?rev=49058&view=rev
Log:
fix async jobs with scalar data (strings, int) got quoted over and over again
Modified:
trunk/admin/inc/class.admin_account.inc.php
trunk/admin/inc/class.uiasyncservice.inc.php
trunk/phpgwapi/inc/common_functions.inc.php
Modified: trunk/admin/inc/class.admin_account.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/admin/inc/class.admin_account.inc.php?rev=49058&r1=49057&r2=49058&view=diff
— trunk/admin/inc/class.admin_account.inc.php (original)
+++ trunk/admin/inc/class.admin_account.inc.php Fri Oct 17 15:51:28 2014
@@ -190,7 +190,7 @@
/**
* Delete an account
*
-
- @param array $content=null
-
-
@param array $content =null
*/
public static function delete(array $content=null)
{
-
@param array $content =null
Modified: trunk/admin/inc/class.uiasyncservice.inc.php
URL: http://svn.stylite.de/viewvc/egroupware/trunk/admin/inc/class.uiasyncservice.inc.php?rev=49058&r1=49057&r2=49058&view=diff
— trunk/admin/inc/class.uiasyncservice.inc.php (original)
+++ trunk/admin/inc/class.uiasyncservice.inc.php Fri Oct 17 15:51:28 2014
@@ -1,6 +1,6 @@
'.lang("You have no email address for your user set !!!")."
\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 ''.lang("Error setting timer, wrong syntax or maybe there's one already running !!!")."
\n"; } @@ -93,11 +93,7 @@ if (isset($_POST['asyncservice']) && $_POST['asyncservice'] != $GLOBALS['egw_info']['server']['asyncservice']) { - $config =& CreateObject('phpgwapi.config','phpgwapi'); - $config->read_repository(); - $config->value('asyncservice',$GLOBALS['egw_info']['server']['asyncservice']=$_POST['asyncservice']); - $config->save_repository(); - unset($config); + config::save_value('asyncservice', $GLOBALS['egw_info']['server']['asyncservice']=$_POST['asyncservice'], 'phpgwapi'); } if (!$async->only_fallback) { @@ -189,7 +185,6 @@ } echo ''."\n"; echo "\n"; - } function test($to) Modified: trunk/phpgwapi/inc/common_functions.inc.php URL: http://svn.stylite.de/viewvc/egroupware/trunk/phpgwapi/inc/common_functions.inc.php?rev=49058&r1=49057&r2=49058&view=diff ============================================================================== --- trunk/phpgwapi/inc/common_functions.inc.php (original) +++ trunk/phpgwapi/inc/common_functions.inc.php Fri Oct 17 15:51:28 2014 @@ -246,7 +246,7 @@ * Check if a given extension is loaded or load it if possible (requires sometimes disabled or unavailable dl function) * * @param string $extension - * @param boolean $throw=false should we throw an exception, if $extension could not be loaded, default false = no + * @param boolean $throw =false should we throw an exception, if $extension could not be loaded, default false = no * @return boolean true if loaded now, false otherwise */ function check_load_extension($extension,$throw=false) @@ -1118,7 +1118,7 @@ * print an array or object as pre-formatted html * * @param mixed $array - * @param boolean $print=true print or return the content + * @param boolean $print =true print or return the content * @return string if !$print */ function _debug_array($array,$print=True) @@ -1324,7 +1324,7 @@ * backtrace of the calling functions for php4.3+ else menuaction/scriptname * * @author RalfBecker-AT-outdoor-training.de - * @param int $remove=0 number of levels to remove + * @param int $remove =0 number of levels to remove * @return string function-names separated by slashes (beginning with the calling function not this one) */ function function_backtrace($remove=0) @@ -1356,7 +1356,7 @@ * * @internal * @param array &$var reference of array to check - * @param string $name='' name of the array + * @param string $name ='' name of the array */ function _check_script_tag(&$var,$name='') { @@ -1499,7 +1499,7 @@ * function to handle multilanguage support * * @param string $key message in englich with %1, %2, ... placeholders - * @param string $vars=null multiple values to replace the placeholders + * @param string $vars =null multiple values to replace the placeholders * @return string translated message with placeholders replaced */ function lang($key,$vars=null) @@ -1520,7 +1520,7 @@ * as calling lang would try to load the translations, evtl. cause more errors, eg. because there's no db-connection. * * @param string $key message in englich with %1, %2, ... placeholders - * @param string $vars=null multiple values to replace the placeholders + * @param string $vars =null multiple values to replace the placeholders * @return string translated message with placeholders replaced */ function try_lang($key,$vars=null) @@ -1596,7 +1596,7 @@ * Used to migrate from PHP serialized database values to json-encoded ones. * * @param string $str string with serialized array - * @param boolean $allow_not_serialized=false true: return $str as is, if it is no serialized array + * @param boolean $allow_not_serialized =false true: return $str as is, if it is no serialized array * @return array|str|false */ function json_php_unserialize($str, $allow_not_serialized=false) @@ -1606,9 +1606,9 @@ { return $arr; } - if (!$allow_not_serialized || $str[0] == '[' || $str[0] == '{') - { - return json_decode($str, true); + if (!$allow_not_serialized || $str[0] == '[' || $str[0] == '{' || $str[0] == '"' || $str === 'null' || ($val = json_decode($str)) !== null) + { + return isset($val) ? $val : json_decode($str, true); } return $str; } ------------------------------------------------------------------------------ Comprehensive Server Monitoring with Site24x7. Monitor 10 servers for $9/Month. Get alerted through email, SMS, voice calls or mobile push notifications. Take corrective actions from your mobile device. http://p.sf.net/sfu/Zoho _______________________________________________ eGroupWare-cvs mailing list eGroupWare-cvs@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/egroupware-cvs