diff options
Diffstat (limited to 'mod/mod-package-details.cxx')
-rw-r--r-- | mod/mod-package-details.cxx | 29 |
1 files changed, 14 insertions, 15 deletions
diff --git a/mod/mod-package-details.cxx b/mod/mod-package-details.cxx index 3a7b31c..b533454 100644 --- a/mod/mod-package-details.cxx +++ b/mod/mod-package-details.cxx @@ -97,21 +97,20 @@ handle (request& rq, response& rs) size_t page (params.page ()); const string& squery (params.query ()); - auto url ( - [&ename](bool f = false, - const string& q = "", - size_t p = 0, - const string& a = "") -> string - { - string s ("?"); - string u (ename); - - if (f) { u += "?f=full"; s = "&"; } - if (!q.empty ()) { u += s + "q=" + mime_url_encode (q); s = "&"; } - if (p > 0) { u += s + "p=" + to_string (p); s = "&"; } - if (!a.empty ()) { u += '#' + a; } - return u; - }); + auto url = [&ename] (bool f = false, + const string& q = "", + size_t p = 0, + const string& a = "") -> string + { + string s ("?"); + string u (ename); + + if (f) { u += "?f=full"; s = "&"; } + if (!q.empty ()) { u += s + "q=" + mime_url_encode (q); s = "&"; } + if (p > 0) { u += s + "p=" + to_string (p); s = "&"; } + if (!a.empty ()) { u += '#' + a; } + return u; + }; xml::serializer s (rs.content (), name); |