More work on scan. The search.egw script takes care of cached
[egate.git] / www / search.egw
index c72263e..7f1c0ef 100644 (file)
@@ -1,6 +1,6 @@
 <html>
 {
-# $Id: search.egw,v 1.19 1995/12/21 15:49:52 adam Exp $
+# $Id: search.egw,v 1.20 1995/12/22 14:21:15 adam Exp $
 
 proc perform-scan {} {
     global sessionId
@@ -27,17 +27,15 @@ proc perform-scan {} {
     set hist($setNo,$scanNo,scanTerm) [lindex $termPlusAttr 0]
     
     set hist($setNo,form,menu1) [wform menu1]
-    set hist($setNo,form,menu2) ""
-    set hist($setNo,form,menu3) ""
+    set hist($setNo,form,menu2) [wform menu2]
+    set hist($setNo,form,menu3) [wform menu3]
 
     set hist($setNo,form,entry1) [wform entry1]
-    set hist($setNo,form,entry2) ""
-    set hist($setNo,form,entry3) ""
+    set hist($setNo,form,entry2) [wform entry2]
+    set hist($setNo,form,entry3) [wform entry3]
 
-    set hist($setNo,form,logic1) ""
-    set hist($setNo,form,logic2) ""
-
-    incr nextSetNo
+    set hist($setNo,form,logic1) [wform logic1]
+    set hist($setNo,form,logic2) [wform logic2]
 
     set host $hist($setNo,host)
     set databases [lindex $targets($host) 1]
@@ -160,7 +158,17 @@ proc buttons {setNo setMax startPos after} {
     global hist
 
     set setNo [lindex $sessionParms 0]
+
     if {[wform menu1] != ""} {
+        set hist($nextSetNo,idAuthentication) $hist($setNo,idAuthentication)
+        set hist($nextSetNo,host) $hist($setNo,host)
+
+        if {$nextSetNo == $setNo} {
+            set setNo $nextSetNo
+            incr nextSetNo
+        } else {
+            catch {unset hist($setNo,hits)}
+        }
         if {[wform submit] == "Scan"} {
             perform-scan
             wabort
@@ -186,8 +194,6 @@ proc buttons {setNo setMax startPos after} {
         set hist($setNo,form,logic1) [wform logic1]
         set hist($setNo,form,logic2) [wform logic2]
 
-        incr nextSetNo
-    
         set host $hist($setNo,host)
         set databases [lindex $targets($host) 1]