From ed4f50cbb77c8217c22e185f144cfbcadbd32fd1 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 9 Sep 2010 09:09:02 +0000 Subject: [PATCH] if modified timestamp get set, reset evtl. existing deleted timestamp, as recovering of deleted entries does NOT work otherwise --- phpgwapi/inc/class.contenthistory.inc.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/phpgwapi/inc/class.contenthistory.inc.php b/phpgwapi/inc/class.contenthistory.inc.php index 36c49c2a5f..61b373202c 100644 --- a/phpgwapi/inc/class.contenthistory.inc.php +++ b/phpgwapi/inc/class.contenthistory.inc.php @@ -165,6 +165,9 @@ class contenthistory 'sync_changedby' => $GLOBALS['egw_info']['user']['account_id'], $_action == 'delete' ? 'sync_deleted' : 'sync_modified' => $this->db->to_timestamp($_ts), ); + // if deleted entry get's modified, removed deleted timestamp, as it got recovered + if ($_action == 'modify') $newData['sync_deleted'] = null; + $this->db->update(self::TABLE, $newData, $where,__LINE__,__FILE__); break; }