From dd97ded32606707d7617a1b83aabd654f8bbcec3 Mon Sep 17 00:00:00 2001 From: lalka2018 <99399973+lalka2016@users.noreply.github.com> Date: Tue, 13 Jun 2023 20:57:49 +0300 Subject: [PATCH] Search: some fixes (#896) --- Web/Models/Repositories/Videos.php | 2 +- Web/Presenters/templates/Search/Index.xml | 30 ++++++++++--------- .../templates/components/comment.xml | 16 +++++++++- Web/static/js/openvk.cls.js | 2 +- locales/en.strings | 3 ++ locales/ru.strings | 3 ++ locales/ru_old.strings | 3 ++ locales/ru_sov.strings | 3 ++ 8 files changed, 45 insertions(+), 17 deletions(-) diff --git a/Web/Models/Repositories/Videos.php b/Web/Models/Repositories/Videos.php index 30753371..63273349 100644 --- a/Web/Models/Repositories/Videos.php +++ b/Web/Models/Repositories/Videos.php @@ -58,7 +58,7 @@ class Videos else $paramValue != NULL ? $notNullParams+=["$paramName" => "$paramValue"] : NULL; - $result = $this->videos->where("name OR description LIKE ?", $query)->where("deleted", 0); + $result = $this->videos->where("CONCAT_WS(' ', name, description) LIKE ?", $query)->where("deleted", 0); $nnparamsCount = sizeof($notNullParams); if($nnparamsCount > 0) { diff --git a/Web/Presenters/templates/Search/Index.xml b/Web/Presenters/templates/Search/Index.xml index 828ffe62..4d629890 100644 --- a/Web/Presenters/templates/Search/Index.xml +++ b/Web/Presenters/templates/Search/Index.xml @@ -89,7 +89,7 @@ {if !is_null($_GET['address']) && $_GET['address'] != "" && $x->getPrivacySetting("page.info.read") > 1}
{_s_date_before}:
+ {if $type != "users"}
+
{_s_date_before}:
+ {else}
+
{_s_registered_before}:
+ {/if}
{_s_date_after}:
+ {if $type != "users"}
+
{_s_date_after}:
+ {else}
+
{_s_registered_after}:
+ {/if}
{_male}
-{_female}
-{_s_any}
+{_male}
+{_female}
+{_s_any}