From 58f462f6b72f279dfe619d17cb982b67a8f3c75b Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Sat, 30 Jul 2005 10:25:17 +0000 Subject: [PATCH] Fix returns for xml-rpc functions. This has been tested using a modified Frontier for perl. --- preferences/inc/class.bosettings.inc.php | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/preferences/inc/class.bosettings.inc.php b/preferences/inc/class.bosettings.inc.php index ccf1c36219..62ed3d3f70 100644 --- a/preferences/inc/class.bosettings.inc.php +++ b/preferences/inc/class.bosettings.inc.php @@ -103,7 +103,7 @@ return True; } - function read($app,$prefix,$type='user') + function read($app,$prefix='',$type='user') { switch($type) // set up some class vars to be used when processing the hooks { @@ -130,6 +130,15 @@ echo 'Preferences array:' . "\n"; _debug_array($this->prefs); } + /* Ensure that a struct will be returned via xml-rpc (this might change) */ + if($this->xmlrpc) + { + return $this->prefs; + } + else + { + return False; + } } function _write($appname,$prefix,$type='user') @@ -196,7 +205,7 @@ $GLOBALS['egw']->preferences->save_repository(True,$type); - return False; + return $this->prefs; } function check_app()