From 9d77bffd4c0c3aee07aac71151779181b7169925 Mon Sep 17 00:00:00 2001 From: Miles Lott Date: Sun, 21 Jan 2001 20:34:50 +0000 Subject: [PATCH] SQL fix to have entries display when switching to timetrack enabled and no company_id is set --- addressbook/inc/class.addressbook_ldap.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_ldap.inc.php b/addressbook/inc/class.addressbook_ldap.inc.php index 4859d29c04..3fa4c06966 100644 --- a/addressbook/inc/class.addressbook_ldap.inc.php +++ b/addressbook/inc/class.addressbook_ldap.inc.php @@ -321,7 +321,7 @@ if ($phpgw_info["apps"]["timetrack"]["enabled"]) { $phpgw->db->query("SELECT a.ab_id,a.ab_owner,a.ab_firstname,a.ab_lastname," . "a.ab_email,a.ab_wphone,c.company_name " - . "from addressbook as a, customers as c where a.ab_company_id = c.company_id " + . "from addressbook as a, customers as c where a.ab_company_id = c.company_id OR a.ab_company_id = '' OR a.ab_company_id = '0' " . "AND $filtermethod $ordermethod limit $limit",__LINE__,__FILE__); } else { $phpgw->db->query("SELECT * from addressbook WHERE $filtermethod $ordermethod limit $limit",__LINE__,__FILE__); diff --git a/addressbook/inc/class.addressbook_sql.inc.php b/addressbook/inc/class.addressbook_sql.inc.php index 4859d29c04..3fa4c06966 100644 --- a/addressbook/inc/class.addressbook_sql.inc.php +++ b/addressbook/inc/class.addressbook_sql.inc.php @@ -321,7 +321,7 @@ if ($phpgw_info["apps"]["timetrack"]["enabled"]) { $phpgw->db->query("SELECT a.ab_id,a.ab_owner,a.ab_firstname,a.ab_lastname," . "a.ab_email,a.ab_wphone,c.company_name " - . "from addressbook as a, customers as c where a.ab_company_id = c.company_id " + . "from addressbook as a, customers as c where a.ab_company_id = c.company_id OR a.ab_company_id = '' OR a.ab_company_id = '0' " . "AND $filtermethod $ordermethod limit $limit",__LINE__,__FILE__); } else { $phpgw->db->query("SELECT * from addressbook WHERE $filtermethod $ordermethod limit $limit",__LINE__,__FILE__);