forked from extern/egroupware
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:
parent
991980ac3a
commit
3d20422177
@ -1417,7 +1417,7 @@ class egw_link extends solink
|
|||||||
static function file_access($app,$id,$required=EGW_ACL_READ,$rel_path=null,$user=null)
|
static function file_access($app,$id,$required=EGW_ACL_READ,$rel_path=null,$user=null)
|
||||||
{
|
{
|
||||||
// are we called for an other user
|
// 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
|
// 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')))
|
if (!self::get_registry($app,'file_access_user') || !($method = self::get_registry($app,'file_access')))
|
||||||
|
@ -38,12 +38,6 @@ class solink
|
|||||||
* @var egw_db
|
* @var egw_db
|
||||||
*/
|
*/
|
||||||
private static $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)
|
* True if call to get_links or get_3links exceeded limit (contains not all rows)
|
||||||
*/
|
*/
|
||||||
@ -83,7 +77,7 @@ class solink
|
|||||||
}
|
}
|
||||||
if (!$owner)
|
if (!$owner)
|
||||||
{
|
{
|
||||||
$owner = self::$user;
|
$owner = $GLOBALS['egw_info']['user']['account_id'];
|
||||||
}
|
}
|
||||||
return self::$db->insert(self::TABLE,array(
|
return self::$db->insert(self::TABLE,array(
|
||||||
'link_app1' => $app1,
|
'link_app1' => $app1,
|
||||||
@ -464,7 +458,6 @@ class solink
|
|||||||
static function init_static( )
|
static function init_static( )
|
||||||
{
|
{
|
||||||
self::$db = $GLOBALS['egw']->db;
|
self::$db = $GLOBALS['egw']->db;
|
||||||
self::$user =& $GLOBALS['egw_info']['user']['account_id'];
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
solink::init_static();
|
solink::init_static();
|
||||||
|
Loading…
Reference in New Issue
Block a user