From f55a668bdfdd374ab03977da48fec9075d17a04f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 19 Jul 2013 15:22:00 +0000 Subject: [PATCH] include user-data and common prefs like we already do it with eg. server config --- phpgwapi/inc/class.egw_framework.inc.php | 12 ++--- phpgwapi/user.php | 57 ++++++++++++++++++++++++ 2 files changed, 60 insertions(+), 9 deletions(-) create mode 100644 phpgwapi/user.php diff --git a/phpgwapi/inc/class.egw_framework.inc.php b/phpgwapi/inc/class.egw_framework.inc.php index d76f97bf05..89e560b793 100644 --- a/phpgwapi/inc/class.egw_framework.inc.php +++ b/phpgwapi/inc/class.egw_framework.inc.php @@ -834,24 +834,18 @@ abstract class egw_framework { $java_script .= $GLOBALS['egw_info']['flags']['java_script_thirst'] . "\n"; } - // add configuration and link-registry for non-popup windows + // add configuration, link-registry, images, user-data and -perferences for non-popup windows if ($GLOBALS['egw_info']['flags']['js_link_registry']) { self::validate_file('/phpgwapi/config.php'); self::validate_file('/phpgwapi/images.php',array('template' => $GLOBALS['egw_info']['user']['preferences']['common']['template_set'])); + self::validate_file('/phpgwapi/user.php',array('user' => $GLOBALS['egw_info']['user']['account_lid'])); } $extra['url'] = $GLOBALS['egw_info']['server']['webserver_url']; $extra['include'] = array_map(function($str){return substr($str,1);}, self::get_script_links(true), array(1)); $extra['app'] = $GLOBALS['egw_info']['flags']['currentapp']; - // add link registry to non-popup windows, if explicit requested (idots_framework::navbar() loads it, if not explicit specified!) - if ($GLOBALS['egw_info']['flags']['js_link_registry']) - { - $extra['preferences'] = array('common' => $GLOBALS['egw_info']['user']['preferences']['common']); - $extra['user'] = $GLOBALS['egw']->accounts->json($GLOBALS['egw_info']['user']['account_id']); - } - // Load LABjs ONCE here $java_script .= '\n". '