From fb3c7ddbcc74f3334e462a5dfa065f184e5daf76 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Thu, 23 Nov 2017 14:47:50 +0100 Subject: [PATCH] fix leading or trailing comma in info_from by 17.1 update --- infolog/setup/tables_update.inc.php | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/infolog/setup/tables_update.inc.php b/infolog/setup/tables_update.inc.php index 6d4ab81d43..3a81111231 100644 --- a/infolog/setup/tables_update.inc.php +++ b/infolog/setup/tables_update.inc.php @@ -937,11 +937,8 @@ function infolog_upgrade16_1_002() */ function infolog_upgrade16_1_003() { - $GLOBALS['egw_setup']->db->query("UPDATE egw_infolog SET info_from = CONCAT(info_from, ', ', info_addr)". - " WHERE info_from IS NOT NULL AND info_addr IS NOT NULL", __LINE__, __FILE__); - - $GLOBALS['egw_setup']->db->query("UPDATE egw_infolog SET info_from = info_addr". - " WHERE info_from IS NULL AND info_addr IS NOT NULL", __LINE__, __FILE__); + $GLOBALS['egw_setup']->db->query("UPDATE egw_infolog SET info_from = CASE WHEN info_from != '' THEN CONCAT(info_from, ', ', info_addr) ELSE info_addr END". + " WHERE info_addr != ''", __LINE__, __FILE__); $GLOBALS['egw_setup']->oProc->DropColumn('egw_infolog',array( 'fd' => array(