From 3d20422177230ca18ea157712b727205accd0478 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 2 Sep 2013 10:43:16 +0000 Subject: [PATCH] not creating references to ['egw_info']['user'], as bo_tracking and other async service stuff has problems to change between different user enviroments --- phpgwapi/inc/class.egw_link.inc.php | 2 +- phpgwapi/inc/class.solink.inc.php | 9 +-------- 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/phpgwapi/inc/class.egw_link.inc.php b/phpgwapi/inc/class.egw_link.inc.php index dc5f5c0e78..2ac1869a6d 100644 --- a/phpgwapi/inc/class.egw_link.inc.php +++ b/phpgwapi/inc/class.egw_link.inc.php @@ -1417,7 +1417,7 @@ class egw_link extends solink static function file_access($app,$id,$required=EGW_ACL_READ,$rel_path=null,$user=null) { // are we called for an other user - if ($user && $user != self::$user) + if ($user && $user != $GLOBALS['egw_info']['user']['account_id']) { // check if app supports file_access WITH 4th $user parameter --> return false if not if (!self::get_registry($app,'file_access_user') || !($method = self::get_registry($app,'file_access'))) diff --git a/phpgwapi/inc/class.solink.inc.php b/phpgwapi/inc/class.solink.inc.php index d36038f1db..e466cd3d32 100644 --- a/phpgwapi/inc/class.solink.inc.php +++ b/phpgwapi/inc/class.solink.inc.php @@ -38,12 +38,6 @@ class solink * @var egw_db */ private static $db; - /** - * Reference to current user from $GLOBALS['egw_info']['user']['account_id'] - * - * @var int - */ - protected static $user; /** * True if call to get_links or get_3links exceeded limit (contains not all rows) */ @@ -83,7 +77,7 @@ class solink } if (!$owner) { - $owner = self::$user; + $owner = $GLOBALS['egw_info']['user']['account_id']; } return self::$db->insert(self::TABLE,array( 'link_app1' => $app1, @@ -464,7 +458,6 @@ class solink static function init_static( ) { self::$db = $GLOBALS['egw']->db; - self::$user =& $GLOBALS['egw_info']['user']['account_id']; } } solink::init_static();