Also store the searchtext in the current session.
authorMartin Blumenthal <tinu@humbapa.ch>
Thu, 4 Jun 2009 14:58:23 +0000 (16:58 +0200)
committerMartin Blumenthal <tinu@humbapa.ch>
Thu, 4 Jun 2009 14:58:23 +0000 (16:58 +0200)
skoli/search.php

index 3a646ed..f67c933 100644 (file)
@@ -44,8 +44,11 @@ if (($type = Util::getFormData('type')) !== null) {
 } else if (isset($_SESSION['skoli']['search_type'])) {
     $type = $_SESSION['skoli']['search_type'];
 }
-
-$search = Util::getFormData('stext');
+if (($search = Util::getFormData('stext')) !== null) {
+    $_SESSION['skoli']['search_stext'] = $search;
+} else if (isset($_SESSION['skoli']['search_stext'])) {
+    $search = $_SESSION['skoli']['search_stext'];
+}
 
 /* Sort out the sorting values */
 $sortby = Util::getFormData('sortby');