aboutsummaryrefslogtreecommitdiff
path: root/mod/mod-builds.cxx
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2018-07-12 15:28:32 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2018-07-12 15:34:00 +0300
commit4b5c7b13f0ebd44c05b50ef8c3e56b0d02bfc4fe (patch)
tree82b8748af9b4b5cb43f062adfd5060e345fef92c /mod/mod-builds.cxx
parent30f4cd73410479a95cc7a21958a594d2d7e5993f (diff)
Use 'builds' parameter instead of 'pn' for ?builds handler
Diffstat (limited to 'mod/mod-builds.cxx')
-rw-r--r--mod/mod-builds.cxx15
1 files changed, 12 insertions, 3 deletions
diff --git a/mod/mod-builds.cxx b/mod/mod-builds.cxx
index f255b25..19d187c 100644
--- a/mod/mod-builds.cxx
+++ b/mod/mod-builds.cxx
@@ -285,6 +285,11 @@ handle (request& rq, response& rs)
throw invalid_request (400, e.what ());
}
+ // Override the name parameter for the old URL (see options.cli for details).
+ //
+ if (params.name_legacy_specified ())
+ params.name (params.name_legacy ());
+
const char* title ("Builds");
xml::serializer s (rs.content (), title);
@@ -358,10 +363,9 @@ handle (request& rq, response& rs)
// query part.
//
s << FORM
- << *INPUT(TYPE="hidden", NAME="builds")
<< TABLE(ID="filter", CLASS="proplist")
<< TBODY
- << TR_INPUT ("name", "pn", params.name (), "*", true)
+ << TR_INPUT ("name", "builds", params.name (), "*", true)
<< TR_INPUT ("version", "pv", params.version (), "*")
<< TR_SELECT ("toolchain", "tc", ctc, toolchain_opts)
@@ -827,6 +831,12 @@ handle (request& rq, response& rs)
string u (root.string () + "?builds");
+ if (!params.name ().empty ())
+ {
+ u += '=';
+ u += mime_url_encode (params.name ());
+ }
+
auto add_filter = [&u] (const char* pn,
const string& pv,
const char* def = "")
@@ -840,7 +850,6 @@ handle (request& rq, response& rs)
}
};
- add_filter ("pn", params.name ());
add_filter ("pv", params.version ());
add_filter ("tc", params.toolchain (), "*");
add_filter ("cf", params.configuration ());