not creating references to ['egw_info']['user'], as bo_tracking and other async service stuff has problems to change between different user enviroments

This commit is contained in:
Ralf Becker 2013-09-02 10:43:16 +00:00
parent 991980ac3a
commit 3d20422177
2 changed files with 2 additions and 9 deletions

View File

@ -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')))

View File

@ -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();