From 7647221d965c328ea7cd862cfd47dd2fbfa22226 Mon Sep 17 00:00:00 2001 From: bettina Date: Fri, 8 Dec 2000 17:25:51 +0000 Subject: [PATCH] changed db selection to work with ttracker --- addressbook/index.php | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/addressbook/index.php b/addressbook/index.php index d78d380a54..e432d3d8cb 100755 --- a/addressbook/index.php +++ b/addressbook/index.php @@ -137,7 +137,7 @@ if (isset($query) && $query) { if (isset($phpgw_info["apps"]["timetrack"]["enabled"]) && $phpgw_info["apps"]["timetrack"]["enabled"]) { - $phpgw->db->query("SELECT a.ab_id,a.ab_owner,a.ab_firstname,a.ab_lastname," + $phpgw->db->query("SELECT a.ab_id,a.ab_owner,a.ab_firstname,a.ab_lastname,a.ab_company_id," . "a.ab_email,a.ab_wphone,c.company_name,a.ab_hphone,a.ab_fax,a.ab_mphone " . "from addressbook as a, customers as c where a.ab_company_id = c.company_id " . "AND $filtermethod AND (a.ab_lastname like '" @@ -169,18 +169,30 @@ $ab_id = $phpgw->db->f("ab_id"); - while ($column = each($columns_to_display)) { - if ($phpgw_info["apps"]["timetrack"]["enabled"]) { + while ($column = each($columns_to_display)) { if ($column[0] == "company") { - $field = $phpgw->db->f("company_name"); - } else { + if ($phpgw_info["apps"]["timetrack"]["enabled"]) { + $field = $phpgw->db->f("company_name"); + } else { $field = $phpgw->db->f("ab_company"); - } - } else { + } + } else { $field = $phpgw->db->f("ab_" . $column[0]); - } + } - $field = $phpgw->strip_html($field); +/* + while ($column = each($columns_to_display)) { + if ($phpgw_info["apps"]["timetrack"]["enabled"]) { + if ($column[0] == "company") { + $field = $phpgw->db->f("company_name"); + } else { + $field = $phpgw->db->f("ab_company"); + } + } else { + $field = $phpgw->db->f("ab_" . $column[0]); + } */ + + $field = htmlentities($field); // Some fields require special formating. if ($column[0] == "url") {