From 9eed5c6ed87ae35264a45bdff22e0f2a784213d3 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Thu, 11 Feb 2016 14:28:50 +0100 Subject: [PATCH] sort TWKN by id not created --- classes/PublicAndExternalNoticeStream.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/classes/PublicAndExternalNoticeStream.php b/classes/PublicAndExternalNoticeStream.php index 3e58964..5e85aff 100644 --- a/classes/PublicAndExternalNoticeStream.php +++ b/classes/PublicAndExternalNoticeStream.php @@ -71,8 +71,13 @@ class RawPublicAndExternalNoticeStream extends NoticeStream $notice->whereAdd('is_local !='. Notice::GATEWAY); $notice->whereAdd('repeat_of IS NULL'); - Notice::addWhereSinceId($notice, $since_id); - Notice::addWhereMaxId($notice, $max_id); + if(!empty($max_id) && is_numeric($max_id)) { + $notice->whereAdd('id < '.$max_id); + } + + if(!empty($since_id) && is_numeric($since_id)) { + $notice->whereAdd('id > '.$since_id); + } $ids = array();