From 8e586c503734ca7662335a1246ade4ed045d33ae Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Fri, 1 Mar 2013 08:25:29 +0000 Subject: [PATCH] * Addressbook: fixed not working call auf addressbook_ui::(view|edit) with contact_id being a uid --- addressbook/inc/class.addressbook_so.inc.php | 2 +- addressbook/inc/class.addressbook_sql.inc.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/addressbook/inc/class.addressbook_so.inc.php b/addressbook/inc/class.addressbook_so.inc.php index 4f6577228b..505a3094b5 100755 --- a/addressbook/inc/class.addressbook_so.inc.php +++ b/addressbook/inc/class.addressbook_so.inc.php @@ -551,7 +551,7 @@ class addressbook_so */ function read($contact_id) { - if (!is_array($contact_id) && substr($contact_id,0,8) == 'account:') + if (!is_array($contact_id) && is_numeric($contact_id) && substr($contact_id,0,8) == 'account:') { $contact_id = array('account_id' => (int) substr($contact_id,8)); } diff --git a/addressbook/inc/class.addressbook_sql.inc.php b/addressbook/inc/class.addressbook_sql.inc.php index e00a3b332e..9f01ad2ec3 100644 --- a/addressbook/inc/class.addressbook_sql.inc.php +++ b/addressbook/inc/class.addressbook_sql.inc.php @@ -714,7 +714,7 @@ class addressbook_sql extends so_sql_cf if (!is_array($keys) && !is_numeric($keys)) { - $keys = array('contact_uid' => $keys); + $keys = array('uid' => $keys); } $contact = parent::read($keys,$extra_cols,$join);