aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-package-details.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-08-06 22:03:31 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-08-07 19:19:22 +0300
commit443088f6093d3420212be0e1af3b9e802dca9362 (patch)
treeb1ec3b0c62ee0b8d66b0cbf21e21d68ae0d4f806 /mod/mod-package-details.cxx
parent7db53790ca2d2c004bfd00b503eca59a8d084870 (diff)
Add support for advanced package search
Diffstat (limited to 'mod/mod-package-details.cxx')
-rw-r--r--mod/mod-package-details.cxx10
1 files changed, 5 insertions, 5 deletions
diff --git a/mod/mod-package-details.cxx b/mod/mod-package-details.cxx
index 15a4115..ceb23c5 100644
--- a/mod/mod-package-details.cxx
+++ b/mod/mod-package-details.cxx
@@ -119,7 +119,7 @@ handle (request& rq, response& rs)
throw invalid_request (400, "invalid package name format");
}
- const package_name& name (pkg->name);
+ const package_name& name (pkg->name);
const string ename (mime_url_encode (name.string (), false));
auto url = [&ename] (bool f = false,
@@ -226,8 +226,8 @@ handle (request& rq, response& rs)
}
size_t pkg_count (
- package_db_->query_value<package_count> (
- search_params<package_count> (squery, tenant, name)));
+ package_db_->query_value<package_search_count> (
+ search_params<package_search_count> (squery, tenant, name)));
// Let's disable autofocus in the full page mode since clicking the full or
// more link the user most likely intends to read rather than search, while
@@ -244,8 +244,8 @@ handle (request& rq, response& rs)
search_params<package_search_rank> (squery, tenant, name) +
"ORDER BY rank DESC, version_epoch DESC, "
"version_canonical_upstream DESC, version_canonical_release DESC, "
- "version_revision DESC" +
- "OFFSET" + to_string (page * res_page) +
+ "version_revision DESC" +
+ "OFFSET" + to_string (page * res_page) +
"LIMIT" + to_string (res_page)))
{
shared_ptr<package> p (package_db_->load<package> (pr.id));