Modify

Opened 6 years ago

Closed 6 years ago

Last modified 6 years ago

#1651 closed Bug/Fehler (fixed)

Zu kurzer Suchbegriff und "mindestens 1 von 3 Suchkriterien" haben gleiche Fehlermeldung

Reported by: web-looks <info@…> 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 Torsten Riemer, 6 years ago

Milestone: modified-shop-2.0.5.0

comment:2 by Gerhard Waldemair, 6 years ago

Resolution: fixed
Status: newclosed

In 12009:

fix #1651

in reply to:  description comment:3 by Torsten Riemer, 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.

Modify Ticket

Action
as closed The owner will remain somebody.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.