aboutsummaryrefslogtreecommitdiff
path: root/web
diff options
context:
space:
mode:
authorGravatar Victor Huesca <victor.huesca@bootlin.com>2019-08-12 16:43:44 +0200
committerGravatar Thomas Petazzoni <thomas.petazzoni@bootlin.com>2019-08-12 23:35:36 +0200
commitfa0e7ae0c23b4ed8cde7ef665295ee8aa972e71a (patch)
treefa7186ff5d9ae4c14c9ac1ae9714231e0d5f822c /web
parent61aacfa9fea24452cd6eb167a5305baf2a5308d3 (diff)
downloadbuildroot-test-fa0e7ae0c23b4ed8cde7ef665295ee8aa972e71a.tar.gz
buildroot-test-fa0e7ae0c23b4ed8cde7ef665295ee8aa972e71a.tar.bz2
web/funcs.inc.php: fix 'bab_format_sql_filter' indentation
The 'bab_format_sql_filter' function uses tabs indentation whereas the overall file uses two spaces. This patch simply replace those tabs by spaces for consistency. Signed-off-by: Victor Huesca <victor.huesca@bootlin.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
Diffstat (limited to 'web')
-rw-r--r--web/funcs.inc.php42
1 files changed, 21 insertions, 21 deletions
diff --git a/web/funcs.inc.php b/web/funcs.inc.php
index 7e912c1..9582e50 100644
--- a/web/funcs.inc.php
+++ b/web/funcs.inc.php
@@ -32,29 +32,29 @@ function bab_footer()
function bab_format_sql_filter($db, $filters)
{
- $status_map = array(
- "OK" => 0,
- "NOK" => 1,
- "TIMEOUT" => 2,
- );
+ $status_map = array(
+ "OK" => 0,
+ "NOK" => 1,
+ "TIMEOUT" => 2,
+ );
- $sql_filters = implode(' and ', array_map(
- function ($v, $k) use ($db, $status_map) {
- if ($k == "reason")
- return sprintf("%s like %s", $k, $db->quote_smart($v));
- else if ($k == "status")
- return sprintf("%s=%s", $k, $db->quote_smart($status_map[$v]));
- else
- return sprintf("%s=%s", $k, $db->quote_smart($v));
- },
- $filters,
- array_keys($filters)
- ));
+ $sql_filters = implode(' and ', array_map(
+ function ($v, $k) use ($db, $status_map) {
+ if ($k == "reason")
+ return sprintf("%s like %s", $k, $db->quote_smart($v));
+ else if ($k == "status")
+ return sprintf("%s=%s", $k, $db->quote_smart($status_map[$v]));
+ else
+ return sprintf("%s=%s", $k, $db->quote_smart($v));
+ },
+ $filters,
+ array_keys($filters)
+ ));
- if (count($filters))
- return "where " . $sql_filters;
- else
- return "";
+ if (count($filters))
+ return "where " . $sql_filters;
+ else
+ return "";
}
/*