From 0cf2a5735782f65e4771658b1b0629aa224e9022 Mon Sep 17 00:00:00 2001 From: plegall Date: Tue, 20 Aug 2024 14:38:30 +0200 Subject: [PATCH] [search] incoherent search results Vs search filters --- include/functions_search.inc.php | 4 ++-- index.php | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php index 124e2fcb6..47b577f78 100644 --- a/include/functions_search.inc.php +++ b/include/functions_search.inc.php @@ -439,8 +439,8 @@ SELECT $has_filters_filled = true; $clause_for_ratio = array( - 'Portrait' => 'width/height < 0.96', - 'square' => 'width/height BETWEEN 0.96 AND 1.05', + 'Portrait' => 'width/height < 0.95', + 'square' => 'width/height BETWEEN 0.95 AND 1.05', 'Landscape' => '(width/height > 1.05 AND width/height < 2)', 'Panorama' => 'width/height >= 2', ); diff --git a/index.php b/index.php index 82cb35c85..054b0179d 100644 --- a/index.php +++ b/index.php @@ -649,7 +649,7 @@ SELECT foreach ($filter_rows as $row) { - $r = floor($row['width'] / $row['height'] * 100) / 100; + $r = $row['width'] / $row['height']; if ($r < 0.95) { $ratios['Portrait']++;