"query account_lid (via accounts::id2name) only if it's not already in the data

without that accounts_sql::get_list without limit requires quite a lot more time and memory"
This commit is contained in:
Ralf Becker 2009-03-02 11:40:28 +00:00
parent 77a80c0a93
commit cfcbdc93f4

View File

@ -368,7 +368,8 @@ class addressbook_bo extends addressbook_so
{
static $fb_url;
if (!$fb_url && @is_dir(EGW_SERVER_ROOT.'/calendar/inc')) $fb_url = calendar_bo::freebusy_url('');
if ($fb_url) $data['freebusy_uri'] = $fb_url.urlencode($GLOBALS['egw']->accounts->id2name($data['account_id']));
if ($fb_url) $data['freebusy_uri'] = $fb_url.urlencode(
isset($data['account_lid']) ? $data['account_lid'] : $GLOBALS['egw']->accounts->id2name($data['account_id']));
}
return $data;
}