aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-04-01 18:54:39 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2018-04-01 18:54:39 +0200
commite079439c108788a5762577ad013806fae2b6a09c (patch)
tree3477b94530da84ade80b33e32e5d7b960ad8b469
parent08fb849597ff02856a1c5e28f1708066f32cf888 (diff)
downloadbuildroot-test-e079439c108788a5762577ad013806fae2b6a09c.tar.gz
buildroot-test-e079439c108788a5762577ad013806fae2b6a09c.tar.bz2
Allow '%' as a wildcard for the reason argument in index.php
This allows to do: http://autobuild.buildroot.org/?reason=php-% to get all php build failures, not only the ones for a specific version. Or: http://autobuild.buildroot.org/?reason=qt5% to see all Qt5 failures. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
-rw-r--r--web/funcs.inc.php2
-rw-r--r--web/index.php2
2 files changed, 2 insertions, 2 deletions
diff --git a/web/funcs.inc.php b/web/funcs.inc.php
index 6624b0b..d7b1321 100644
--- a/web/funcs.inc.php
+++ b/web/funcs.inc.php
@@ -61,7 +61,7 @@ function bab_get_results($start=0, $count=100, $filter_status=-1, $filter_arch="
if ($filter_arch != "")
$where_parts[] = " arch=" . $db->quote_smart($filter_arch) . " ";
if ($filter_reason != '')
- $where_parts[] = " reason=" . $db->quote_smart($filter_reason) . " ";
+ $where_parts[] = " reason like " . $db->quote_smart($filter_reason) . " ";
if ($filter_submitter != '')
$where_parts[] = " submitter=" . $db->quote_smart($filter_submitter) . " ";
if ($filter_libc != '')
diff --git a/web/index.php b/web/index.php
index 95563fd..25423d5 100644
--- a/web/index.php
+++ b/web/index.php
@@ -58,7 +58,7 @@ if (isset($_GET['branch']) && preg_match("/^[a-z0-9_\.]*$/", $_GET['branch']))
else
$filter_branch = "";
-if (isset($_GET['reason']) && preg_match("/^[A-Za-z0-9_\+\.\-]*$/", $_GET['reason']))
+if (isset($_GET['reason']) && preg_match("/^[A-Za-z0-9_%\+\.\-]*$/", $_GET['reason']))
$filter_reason = $_GET['reason'];
else
$filter_reason = "";