mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-02-01 19:09:30 +01:00
Calendar: Fix missing owner resource icons on initial load
This commit is contained in:
parent
af66c63714
commit
48c589f5fd
@ -322,10 +322,10 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist
|
|||||||
case 'c':
|
case 'c':
|
||||||
case '':
|
case '':
|
||||||
// check if link-search already returned either icon or (l|f)name and only if not, query contact again
|
// check if link-search already returned either icon or (l|f)name and only if not, query contact again
|
||||||
if (!(isset($value['icon']) || isset($value['lname']) && isset($value['fname'])) &&
|
if(!(isset($value['icon']) || isset($value['lname']) && isset($value['fname'])) &&
|
||||||
($contact = $contacts_obj->read($type === '' ? 'account:'.$id : $id, true)))
|
($contact = $contacts_obj->read($type === '' ? 'account:' . $id : $data['res_id'], true)))
|
||||||
{
|
{
|
||||||
if (Api\Contacts::hasPhoto($contact))
|
if(Api\Contacts::hasPhoto($contact))
|
||||||
{
|
{
|
||||||
$value['icon'] = Api\Framework::link('/api/avatar.php', array(
|
$value['icon'] = Api\Framework::link('/api/avatar.php', array(
|
||||||
'contact_id' => $contact['id'],
|
'contact_id' => $contact['id'],
|
||||||
@ -340,7 +340,7 @@ class calendar_owner_etemplate_widget extends Etemplate\Widget\Taglist
|
|||||||
}
|
}
|
||||||
if($id < 0)
|
if($id < 0)
|
||||||
{
|
{
|
||||||
$value['resources'] = array_map('strval',$GLOBALS['egw']->accounts->members($id, true));
|
$value['resources'] = array_map('strval', $GLOBALS['egw']->accounts->members($id, true));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
|
@ -16,6 +16,8 @@ use EGroupware\Api\Egw;
|
|||||||
use EGroupware\Api\Etemplate;
|
use EGroupware\Api\Etemplate;
|
||||||
use EGroupware\Api\Framework;
|
use EGroupware\Api\Framework;
|
||||||
|
|
||||||
|
require_once("class.calendar_owner_etemplate_widget.inc.php");
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Shared base-class of all calendar UserInterface classes
|
* Shared base-class of all calendar UserInterface classes
|
||||||
*
|
*
|
||||||
|
Loading…
Reference in New Issue
Block a user