From 224fa8f7afc7e30a8b00f59952d32abbf76cba28 Mon Sep 17 00:00:00 2001 From: Lars Kneschke Date: Fri, 7 Apr 2006 08:22:46 +0000 Subject: [PATCH] check for 0 and NULL for empty values --- phpgwapi/inc/class.contenthistory.inc.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/phpgwapi/inc/class.contenthistory.inc.php b/phpgwapi/inc/class.contenthistory.inc.php index d737556b68..f4ac055225 100644 --- a/phpgwapi/inc/class.contenthistory.inc.php +++ b/phpgwapi/inc/class.contenthistory.inc.php @@ -77,20 +77,20 @@ switch($_action) { case 'modify': - $query .= "sync_modified > '".$this->db->to_timestamp($_ts)."' and sync_deleted is null"; + $query .= "sync_modified > '".$this->db->to_timestamp($_ts)."' and (sync_deleted is null or sync_deleted = '0')"; break; case 'delete': $query .= "sync_deleted > '".$this->db->to_timestamp($_ts)."'"; break; case 'add': - $query .= "sync_added > '".$this->db->to_timestamp($_ts)."' and sync_deleted is null and sync_modified is null "; + $query .= "sync_added > '".$this->db->to_timestamp($_ts)."' and (sync_deleted is null or sync_deleted = '0') and (sync_modified is null or sync_modified = '0') "; break; default: // no valid $_action set return array(); break; } - //Horde::logMessage("SymcML: egwcontactssync $query", __FILE__, __LINE__, PEAR_LOG_DEBUG); + #Horde::logMessage("SymcML: egwcontactssync $query", __FILE__, __LINE__, PEAR_LOG_DEBUG); $this->db->query($query, __LINE__, __FILE__); $guidList = array(); @@ -158,7 +158,7 @@ 'sync_guid' => $GLOBALS['egw']->common->generate_uid($_appName, $_id), 'sync_changedby' => $GLOBALS['egw_info']['user']['account_id'], ); - error_log("$_action $_appName $_id"); + switch($_action) { case 'add':