diff options
author | rvelices <rv-github@modusoptimus.com> | 2014-04-13 04:44:14 +0000 |
---|---|---|
committer | rvelices <rv-github@modusoptimus.com> | 2014-04-13 04:44:14 +0000 |
commit | 76d4ccb0bb255eb90d9c040040b4a6ec0c5b3eae (patch) | |
tree | d6ad9dcb9ac97d8747387c77b7332d96a4868e1f | |
parent | e6a38c4172e34741db95925826d206dbe9d68e16 (diff) |
bug 3056: quick search - fixes
git-svn-id: http://piwigo.org/svn/trunk@28165 68402e56-0260-453c-a942-63ccdbb3a9ee
-rw-r--r-- | include/functions_search.inc.php | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/include/functions_search.inc.php b/include/functions_search.inc.php index c2b3ef2d2..dc5ad92d0 100644 --- a/include/functions_search.inc.php +++ b/include/functions_search.inc.php @@ -831,12 +831,13 @@ function qsearch_get_text_token_search_sql($token, $fields) $use_ft = mb_strlen($variant)>3; if ($token->modifier & QST_WILDCARD_BEGIN) $use_ft = false; - if (($token->modifier & QST_QUOTED|QST_WILDCARD_END) == QST_QUOTED|QST_WILDCARD_END) + if ($token->modifier & (QST_QUOTED|QST_WILDCARD_END) == (QST_QUOTED|QST_WILDCARD_END)) $use_ft = false; + if ($use_ft) { $max = max( array_map( 'mb_strlen', - preg_split('/['.preg_quote('!"#$%&()*+,./:;<=>?@[\]^`{|}~','/').']+/', $variant0, PREG_SPLIT_NO_EMPTY) + preg_split('/['.preg_quote('!"#$%&()*+,./:;<=>?@[\]^`{|}~','/').']+/', $variant, PREG_SPLIT_NO_EMPTY) ) ); if ($max<4) $use_ft = false; |