diff options
author | Malf Furious <m@lfurio.us> | 2018-10-24 03:26:05 -0400 |
---|---|---|
committer | Malf Furious <m@lfurio.us> | 2018-10-24 03:26:05 -0400 |
commit | 1bb6077c7c74c0b65be906cbeed417f911498e87 (patch) | |
tree | da92dd9f00392c375681a144d0b750b8a81a814b | |
parent | 6a33b7ea7d503d3181cce1e08e4956d8897e915b (diff) | |
download | scrott-1bb6077c7c74c0b65be906cbeed417f911498e87.tar.gz scrott-1bb6077c7c74c0b65be906cbeed417f911498e87.zip |
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 <m@lfurio.us>
-rw-r--r-- | app/class/obj.class.php | 4 |
1 files changed, 2 insertions, 2 deletions
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(); |