From 890cbb87e6c31f6bd12d26e39f6ea1c14a542a2a Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 26 Oct 2006 10:57:47 +0000 Subject: [PATCH] added sub-type 'Account contactdate' --- etemplate/inc/class.contact_widget.inc.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/etemplate/inc/class.contact_widget.inc.php b/etemplate/inc/class.contact_widget.inc.php index 4f2c58e0ab..9b42475817 100644 --- a/etemplate/inc/class.contact_widget.inc.php +++ b/etemplate/inc/class.contact_widget.inc.php @@ -32,6 +32,7 @@ class contact_widget */ var $human_name = array( 'contact-value' => 'Contact', + 'contact-account'=> 'Account contactdata', 'contact-fields' => 'Contact fields', ); /** @@ -87,10 +88,14 @@ class contact_widget $cell['no_lang'] = 1; break; + case 'contact-account': + $value = 'account:'.$value; + // fall-throught case 'contact-value': default: if (substr($value,0,12) == 'addressbook:') $value = substr($value,12); // link-entry syntax - if (!$value || !$cell['size'] || (!is_array($this->contact) || $this->contact['id'] != $value) && + if (!$value || !$cell['size'] || (!is_array($this->contact) || + !($this->contact['id'] == $value || 'account:'.$this->contact['account_id'])) && !($this->contact = $this->contacts->read($value))) { $cell = $tmpl->empty_cell();