#1651 closed Bug/Fehler (fixed)
Zu kurzer Suchbegriff und "mindestens 1 von 3 Suchkriterien" haben gleiche Fehlermeldung
| Reported by: | Owned by: | somebody | |
|---|---|---|---|
| Priority: | normal | Milestone: | modified-shop-2.0.5.0 |
| Component: | Shop | Version: | 2.0.4.2 |
| Keywords: | Cc: | ||
| Blocked By: | Blocking: |
Description
Eine Suche ohne Suchkriterium gibt die gleiche Fehlermeldung aus, wie eine Suche mit zu kurzem Suchbegriff:
https://dev.modified-shop.org/advanced_search_result.php
https://dev.modified-shop.org/advanced_search_result.php?keywords=a
Vorschlag zur Korrektur:
/advanced_search.php
Suchen nach:
if (($_GET['errorno'] & 1) == 1) {
$error .= str_replace('\n', '<br />', JS_AT_LEAST_ONE_INPUT);
}
DANACH einfügen:
if (($_GET['errorno'] & 2) == 2) {
$error .= str_replace('\n', '<br />', JS_KEYWORDS_MIN_LENGTH);
}
/advanced_search_result.php
Suchen nach:
if ($keywords && strlen($keywords) < 3 && strlen($keywords) > 0) {
$errorno += 1;
}
if (!$keywords && !$pfrom && !$pto) {
$errorno += 1;
}
Ersetzen mit:
if (!$keywords && !$pfrom && !$pto) {
$errorno += 1;
}
if ($keywords && strlen($keywords) > 0 && strlen($keywords) < 3) {
$errorno += 2;
}
/lang/german/german.php
Einfügen:
define('JS_KEYWORDS_MIN_LENGTH', 'Der Suchbegriff muss mindestens 3 Zeichen lang sein.\n');
Ich schlage außerdem vor, die Mindestlänge als Option im Adminbereich verfügbar zu machen.
Attachments (0)
Change History (3)
comment:1 by , 6 years ago
| Milestone: | → modified-shop-2.0.5.0 |
|---|
comment:2 by , 6 years ago
| Resolution: | → fixed |
|---|---|
| Status: | new → closed |
comment:3 by , 6 years ago
Replying to web-looks <info@…>:
[...]
Ich schlage außerdem vor, die Mindestlänge als Option im Adminbereich verfügbar zu machen.
Die Einstellung der Mindestlänge kam bereits durch Lösen der Tickets #1598 bzw. #1635 hinzu.

In 12009: