From 20148d23f1a2f1a102e736075c8985041144e621 Mon Sep 17 00:00:00 2001 From: Mario Date: Thu, 29 May 2025 10:13:32 +0000 Subject: toplevel comments pagination: initial commit --- Zotlabs/Module/Request.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'Zotlabs/Module') diff --git a/Zotlabs/Module/Request.php b/Zotlabs/Module/Request.php index 0174694b2..cdce4c66a 100644 --- a/Zotlabs/Module/Request.php +++ b/Zotlabs/Module/Request.php @@ -29,9 +29,15 @@ class Request extends Controller { $mid = $_GET['mid']; $parent = intval($_GET['parent']); + + $offset = null; + if ($_GET['verb'] === 'load') { + $offset = intval($_GET['offset']); + } + $module = strip_tags($_GET['module']); - $items = items_by_thr_parent($mid, $parent); + $items = items_by_thr_parent($mid, $parent, $offset); xchan_query($items); $items = fetch_post_tags($items,true); @@ -44,7 +50,7 @@ class Request extends Controller public function get() : string { - if ($_GET['verb'] === 'comment') { + if (in_array($_GET['verb'], ['comment', 'load'])) { return self::processSubthreadRequest(); } -- cgit v1.2.3