From 1bb6077c7c74c0b65be906cbeed417f911498e87 Mon Sep 17 00:00:00 2001 From: Malf Furious Date: Wed, 24 Oct 2018 03:26:05 -0400 Subject: obj: Fix bug in function getMesgs_ordByDatetime() The SQL query here, as written, was omitting 'log' type messages from the results. Signed-off-by: Malf Furious --- app/class/obj.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app') diff --git a/app/class/obj.class.php b/app/class/obj.class.php index 199529b..850184c 100644 --- a/app/class/obj.class.php +++ b/app/class/obj.class.php @@ -199,8 +199,8 @@ class obj extends table */ public function getMesgs_ordByDatetime() : array { - $query = "SELECT guid FROM objects WHERE objtype = 'mesg' AND " . - "parent = '" . database::esc($this->guid) . "' ORDER BY created"; + $query = "SELECT guid FROM objects WHERE (objtype = 'mesg' OR objtype = 'log') " . + "AND parent = '" . database::esc($this->guid) . "' ORDER BY created"; $res = database::query($query); $mesgs = array(); -- cgit v1.2.3