From 4718a059f842a791c89a1922996bb8f1dbea8f65 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Tue, 16 May 2017 23:27:53 +0300 Subject: Add filter form to builds page --- libbrep/common.hxx | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'libbrep/common.hxx') diff --git a/libbrep/common.hxx b/libbrep/common.hxx index 942790c..6bc5aca 100644 --- a/libbrep/common.hxx +++ b/libbrep/common.hxx @@ -318,10 +318,12 @@ namespace brep template inline auto - order_by_version_desc (const T& x) -> //decltype ("ORDER BY" + x.epoch) - decltype (x.epoch == 0) + order_by_version_desc ( + const T& x, + bool first = true) -> //decltype ("ORDER BY" + x.epoch) + decltype (x.epoch == 0) { - return "ORDER BY" + return (first ? "ORDER BY" : ", ") + x.epoch + "DESC," + x.canonical_upstream + "DESC," + x.canonical_release + "DESC," -- cgit v1.1