Commit 07a2315e888f3eb076a157fc540669b95ef824e0

Authored by conradverm
1 parent 8daa1013

KTS-673

"The search algorithm needs some work"
Updated. Catering for quick search persistence in sessions

Committed By: Conrad Vermeulen
Reviewed By: Kevin Fourie

git-svn-id: https://kt-dms.svn.sourceforge.net/svnroot/kt-dms/trunk@7265 c91229c3-7414-0410-bfa2-8a42b809f60b
Showing 1 changed file with 13 additions and 0 deletions
search2.php
... ... @@ -78,6 +78,19 @@ class SearchDispatcher extends KTStandardDispatcher {
78 78 }
79 79 $query = $_REQUEST['txtQuery'];
80 80  
  81 + $_SESSION['search2_quick'] = 0;
  82 + $_SESSION['search2_general'] = 0;
  83 + if (isset($_REQUEST['cbQuickQuery']) && $_REQUEST['cbQuickQuery'] +0 == 1)
  84 + {
  85 + $_SESSION['search2_quick'] = 1;
  86 + preg_match('/["][^"]*["]/', $query, $out);
  87 + $_SESSION['search2_quickQuery'] = substr($out[0],1,-1);
  88 + }
  89 + if (isset($_REQUEST['cbQuickGeneral']) && $_REQUEST['cbQuickGeneral'] +0 == 1)
  90 + {
  91 + $_SESSION['search2_general'] = 1;
  92 + }
  93 +
81 94 session_unregister('search2_savedid');
82 95  
83 96 $this->processQuery($query);
... ...