diff options
author | Mario <mario@mariovavti.com> | 2024-03-26 14:48:16 +0000 |
---|---|---|
committer | Mario <mario@mariovavti.com> | 2024-03-26 14:48:16 +0000 |
commit | f85d2d3423fdb6a140e0df5f2df751ac9183a2f7 (patch) | |
tree | dfc666ae95c0686e795e2538577678f161af592c /Zotlabs/Module/Dirsearch.php | |
parent | 3859c010f09ecdb8ed543638d435d026e5e1efc2 (diff) | |
download | volse-hubzilla-f85d2d3423fdb6a140e0df5f2df751ac9183a2f7.tar.gz volse-hubzilla-f85d2d3423fdb6a140e0df5f2df751ac9183a2f7.tar.bz2 volse-hubzilla-f85d2d3423fdb6a140e0df5f2df751ac9183a2f7.zip |
reduce default directory result set
Diffstat (limited to 'Zotlabs/Module/Dirsearch.php')
-rw-r--r-- | Zotlabs/Module/Dirsearch.php | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/Zotlabs/Module/Dirsearch.php b/Zotlabs/Module/Dirsearch.php index a90c2104a..d27b195e4 100644 --- a/Zotlabs/Module/Dirsearch.php +++ b/Zotlabs/Module/Dirsearch.php @@ -154,9 +154,13 @@ class Dirsearch extends Controller { } - $perpage = $_REQUEST['n'] ?? 60; - $page = ((isset($_REQUEST['p']) && $_REQUEST['p']) ? intval($_REQUEST['p'] - 1) : 0); - $startrec = (($page+1) * $perpage) - $perpage; + $perpage = $_REQUEST['n'] ?? 30; + if ($perpage > 30) { + $perpage = 30; + } + + $page = ((isset($_REQUEST['p']) && $_REQUEST['p']) ? intval($_REQUEST['p'] - 1) : 0); + $startrec = (($page+1) * $perpage) - $perpage; $limit = $_REQUEST['limit'] ?? 0; $return_total = $_REQUEST['return_total'] ?? 0; |