Commit 9677673d79566d7e8435c2b5cfe872adf0a2b03b
1 parent
e841ae80
KTS-2552
"When searching using the quick search widget, the previous criteria gets corrupted intermittently." Updated. Session not updated correctly. Committed By: Conrad Vermeulen Reviewed By: Kevin Fourie git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7577 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing
1 changed file
with
9 additions
and
2 deletions
search2.php
| @@ -97,8 +97,15 @@ class SearchDispatcher extends KTStandardDispatcher { | @@ -97,8 +97,15 @@ class SearchDispatcher extends KTStandardDispatcher { | ||
| 97 | if (isset($_REQUEST['cbQuickQuery']) && $_REQUEST['cbQuickQuery'] +0 == 1) | 97 | if (isset($_REQUEST['cbQuickQuery']) && $_REQUEST['cbQuickQuery'] +0 == 1) |
| 98 | { | 98 | { |
| 99 | $_SESSION['search2_quick'] = 1; | 99 | $_SESSION['search2_quick'] = 1; |
| 100 | - preg_match('/["][^"]*["]/', $query, $out); | ||
| 101 | - $_SESSION['search2_quickQuery'] = substr($out[0],1,-1); | 100 | + if (stripos($query, 'generaltext') !== false || stripos($query, 'metadata') !== false) |
| 101 | + { | ||
| 102 | + preg_match('/["][^"]*["]/', $query, $out); | ||
| 103 | + $_SESSION['search2_quickQuery'] = substr($out[0],1,-1); | ||
| 104 | + } | ||
| 105 | + } | ||
| 106 | + else | ||
| 107 | + { | ||
| 108 | + $_SESSION['search2_quickQuery'] = ''; | ||
| 102 | } | 109 | } |
| 103 | if (isset($_REQUEST['cbQuickGeneral']) && $_REQUEST['cbQuickGeneral'] +0 == 1) | 110 | if (isset($_REQUEST['cbQuickGeneral']) && $_REQUEST['cbQuickGeneral'] +0 == 1) |
| 104 | { | 111 | { |