mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-24 03:41:53 +02:00
Return an array, not null, if there are no preferences for the app
This commit is contained in:
parent
659406537b
commit
c3abca67db
@ -1269,7 +1269,9 @@ abstract class egw_framework
|
|||||||
if (preg_match('/^[a-z0-9_]+$/i', $app))
|
if (preg_match('/^[a-z0-9_]+$/i', $app))
|
||||||
{
|
{
|
||||||
$response = egw_json_response::get();
|
$response = egw_json_response::get();
|
||||||
$response->script('window.egw.set_preferences('.json_encode($GLOBALS['egw_info']['user']['preferences'][$app]).', "'.$app.'");');
|
$pref = $GLOBALS['egw_info']['user']['preferences'][$app];
|
||||||
|
if(!$pref) $pref = Array();
|
||||||
|
$response->script('window.egw.set_preferences('.json_encode($pref).', "'.$app.'");');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user