Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/packages
diff options
context:
space:
mode:
authorErich Eckner <git@eckner.net>2018-07-10 14:33:03 +0200
committerErich Eckner <git@eckner.net>2018-07-10 14:33:03 +0200
commitf241e7ecf971bed002da474e3bcac5d9cf877510 (patch)
tree75be884a5de0de2afbcd3304c15b8a954f20af45 /packages
parent271dbaf6d80a821cc6657fde96314112ee3394ce (diff)
packages/index.php: fix column types
Diffstat (limited to 'packages')
-rw-r--r--packages/index.php15
1 files changed, 13 insertions, 2 deletions
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";