From f27e330ee359f5abd3ec166363c1abd64027c7e2 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Feb 2017 13:46:03 +0100 Subject: [PATCH 1/2] take out extra inc/inc.DBInit.php --- out/out.Calendar.php | 1 - 1 file changed, 1 deletion(-) diff --git a/out/out.Calendar.php b/out/out.Calendar.php index f708851dd..7620673dd 100644 --- a/out/out.Calendar.php +++ b/out/out.Calendar.php @@ -19,7 +19,6 @@ include("../inc/inc.Settings.php"); include("../inc/inc.ClassCalendar.php"); -include("../inc/inc.DBInit.php"); include("../inc/inc.Language.php"); include("../inc/inc.Init.php"); include("../inc/inc.Extension.php"); From b9a7f622d1f212075076b5bb619205871a19aec4 Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Fri, 24 Feb 2017 13:46:58 +0100 Subject: [PATCH 2/2] remove backticks in sql statement for some strange reason a select `document` ... UNION select `document` will result in a php array where '`document`' and not 'document' is the key. This makes getTimeline() fail. --- SeedDMS_Core/Core/inc.ClassDMS.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SeedDMS_Core/Core/inc.ClassDMS.php b/SeedDMS_Core/Core/inc.ClassDMS.php index 2b1789f89..9c51be665 100644 --- a/SeedDMS_Core/Core/inc.ClassDMS.php +++ b/SeedDMS_Core/Core/inc.ClassDMS.php @@ -2222,7 +2222,7 @@ class SeedDMS_Core_DMS { $endts = $startts+86400; $timeline = array(); - $queryStr = "SELECT DISTINCT `document` FROM `tblDocumentContent` WHERE `date` > ".$startts." AND `date` < ".$endts." UNION SELECT DISTINCT `document` FROM `tblDocumentFiles` WHERE `date` > ".$startts." AND `date` < ".$endts; + $queryStr = "SELECT DISTINCT document FROM `tblDocumentContent` WHERE `date` > ".$startts." AND `date` < ".$endts." UNION SELECT DISTINCT document FROM `tblDocumentFiles` WHERE `date` > ".$startts." AND `date` < ".$endts; $resArr = $this->db->getResultArray($queryStr); if ($resArr === false) return false;