[fix] Excessive quotation in tag searches.
This commit is contained in:
parent
bb94b6efc7
commit
74013fcb06
1
CHANGES
1
CHANGES
|
@ -45,6 +45,7 @@ For further information about Photo Organizer, see its web site at:
|
|||
[add] Initial background image import/processing worker.
|
||||
[add] Pretty-URL the folder search too.
|
||||
[misc] Vastly speed up searching for "multi-word matches"
|
||||
[fix] Fix """"excessive"""" quotation in tag searches.
|
||||
|
||||
2.36.1 (September 27, 2008)
|
||||
|
||||
|
|
|
@ -73,6 +73,9 @@ function validate_search_string($search_string) {
|
|||
$search_string = str_replace("\'", """, $search_string);
|
||||
$search_string = str_replace("*", "", $search_string);
|
||||
$search_string = str_replace("?", "", $search_string);
|
||||
if ($strpos($search_string, ' ') !== FALSE) {
|
||||
$search_string = '"'.$search_string.'"';
|
||||
}
|
||||
return $search_string;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,7 +24,7 @@ include_once "include/orderby.php";
|
|||
include_once "include/stemming.php";
|
||||
include_once "include/search.php";
|
||||
|
||||
$search_data = isset($_REQUEST['keyword']) ? validate_search_string('"'.$_REQUEST['keyword'].'"') : "";
|
||||
$search_data = isset($_REQUEST['keyword']) ? validate_search_string($_REQUEST['keyword']) : "";
|
||||
$master = isset($_REQUEST['only_masters']);
|
||||
|
||||
$offset = pg_escape_string(isset($_REQUEST['offset']) ? $_REQUEST['offset'] : 0);
|
||||
|
|
Loading…
Reference in New Issue