index : archweb32 | |
Archlinux32 website | gitolite user |
summaryrefslogtreecommitdiff |
author | Erich Eckner <git@eckner.net> | 2018-07-10 14:33:03 +0200 |
---|---|---|
committer | Erich Eckner <git@eckner.net> | 2018-07-10 14:33:03 +0200 |
commit | f241e7ecf971bed002da474e3bcac5d9cf877510 (patch) | |
tree | 75be884a5de0de2afbcd3304c15b8a954f20af45 /packages | |
parent | 271dbaf6d80a821cc6657fde96314112ee3394ce (diff) |
-rw-r--r-- | packages/index.php | 15 |
diff --git a/packages/index.php b/packages/index.php index 1347aa9..08c7048 100644 --- a/packages/index.php +++ b/packages/index.php @@ -37,6 +37,11 @@ require_once BASE . "/lib/format.php"; $multi_select_search_criteria[$criterium]["values"][] = $row["name"]; } + $float_columns = array( + "has_issues", + "is_to_be_deleted" + ); + $filter = " WHERE 1"; foreach ($multi_select_search_criteria as $criterium) if (isset($_GET[$criterium["name"]])) { @@ -131,8 +136,11 @@ require_once BASE . "/lib/format.php"; $query ); $exact_matches = array(); - while ($row = $result -> fetch_assoc()) + while ($row = $result -> fetch_assoc()) { + foreach ($float_columns as $float_column) + $row[$float_column] = floatval($row[$float_column]); $exact_matches[] = $row; + } $sorts = array( "arch" => array( @@ -224,8 +232,11 @@ require_once BASE . "/lib/format.php"; " LIMIT " . (($page-1)*100) . ", 100" ); $fuzzy_matches = array(); - while ($row = $result -> fetch_assoc()) + while ($row = $result -> fetch_assoc()) { + foreach ($float_columns as $float_column) + $row[$float_column] = floatval($row[$float_column]); $fuzzy_matches[] = $row; + } function print_results($results) { $oddity="odd"; |