# R49058 - in /trunk: admin/inc/ phpgwapi/inc/

**URL:** <http://discourse.egroupware.org/t/r49058-in-trunk-admin-inc-phpgwapi-inc/62317>\
**Category:** eGW-svn\
**Created:** [October 17, 2014, 1:51pm UTC](http://discourse.egroupware.org/t/r49058-in-trunk-admin-inc-phpgwapi-inc/62317 "2014-10-17T13:51:28Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ralfbecker\_sf](http://discourse.egroupware.org/letter_avatar_proxy/v4/letter/r/b2d939/32.png) [@ralfbecker\_sf](http://discourse.egroupware.org/u/ralfbecker_sf)\
**Post date:** [October 17, 2014, 1:51pm UTC](http://discourse.egroupware.org/t/r49058-in-trunk-admin-inc-phpgwapi-inc/62317/1 "2014-10-17T13:51:28Z")

</div>

Author: ralfbecker  
New Revision: 49058

URL: [http://svn.stylite.de/viewvc/egroupware?rev=49058&view=rev](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](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)  
{

# 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](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 @@

 \<?php /\*\* - \* eGgroupWare admin - Timed Asynchron Services + \* EGgroupware admin - Timed Asynchron Services \* \* @link http://www.egroupware.org \* @author Ralf Becker @@ -59,7 +59,7 @@ { echo '

**'.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
