X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=www%2Fsearch.egw;h=88969cd0c800b6446184757d26c05e149b017c00;hb=8bafbc608e1ffba9ee87f4856e586dffa57901b8;hp=3e66629f0e042344031851c5ef9817206c1f3488;hpb=a4571caef991e968e3c20b515490b7923306a1cf;p=egate.git
diff --git a/www/search.egw b/www/search.egw
index 3e66629..88969cd 100644
--- a/www/search.egw
+++ b/www/search.egw
@@ -1,6 +1,6 @@
{
-# $Id: search.egw,v 1.37 1996/03/12 16:30:28 adam Exp $
+# $Id: search.egw,v 1.39 1996/03/14 11:50:48 adam Exp $
proc start-scan {scanNo targetNo cache dir initSet} {
global sessionId
@@ -35,7 +35,7 @@ proc start-scan {scanNo targetNo cache dir initSet} {
}
if {$hist($setNo,$scanNo,scanTerm) != ""} {
if {[z39scan $setNo $scanNo 0 $lines $pos $cache] != "1"} {
- button-new-query 0 $setNo
+ button-new-query $setNo
egw_log debug "z39_scan failed"
return
}
@@ -60,7 +60,7 @@ proc start-scan {scanNo targetNo cache dir initSet} {
}
html {}
}
- button-new-query 0 $setNo
+ button-new-query $setNo
set databases [splitDatabaseSpec $host]
@@ -121,7 +121,7 @@ proc start-scan {scanNo targetNo cache dir initSet} {
set useIcons 0
if {$hist($setNo,$scanNo,scanTerm) == ""} {
button-main
- button-new-query 0 $setNo
+ button-new-query $setNo
return
}
@@ -151,7 +151,7 @@ proc start-scan {scanNo targetNo cache dir initSet} {
html {Next Terms | }
}
html {}
- button-new-query 0 $setNo
+ button-new-query $setNo
if {!$debug} return
html "
\n"
@@ -162,7 +162,6 @@ proc start-scan {scanNo targetNo cache dir initSet} {
html $e {: } $env($e) {
} \n
}
html "form: " [egw_form] "
\n"
- html "target: " $host "
\n"
html "databases: " $hist($setNo,$targetNo,database) "
\n"
html "selected: " [egw_form base] "
\n"
html "setNo: " $setNo "
\n"
@@ -171,6 +170,10 @@ proc start-scan {scanNo targetNo cache dir initSet} {
if {[info commands saveState] == ""} {
source z39util.tcl
+ if {![info exists debug]} {
+ session-lost
+ egw_abort
+ }
}
global sessionWait
global nextSetNo
@@ -192,7 +195,7 @@ proc start-scan {scanNo targetNo cache dir initSet} {
set setNo $nextSetNo
incr nextSetNo
} else {
- catch {unset hist($setNo,hits)}
+ catch {unset hist($setNo,$targetNo,hits)}
}
set hist($setNo,scan) 0
@@ -214,11 +217,11 @@ proc start-scan {scanNo targetNo cache dir initSet} {
set b [egw_form base]
if {[egw_form baseall] != ""} {
- set hist($setNo,0,database) $databases
+ set hist($setNo,$targetNo,database) $databases
} elseif {$b == ""} {
- set hist($setNo,0,database) $databases
+ set hist($setNo,$targetNo,database) $databases
} else {
- set hist($setNo,0,database) $b
+ set hist($setNo,$targetNo,database) $b
}
set hist($setNo,maxPresent) [egw_form hits]
if {$hist($setNo,maxPresent) == ""} {
@@ -228,7 +231,7 @@ proc start-scan {scanNo targetNo cache dir initSet} {
set hist($setNo,sort) server
set i [lindex $sessionParms 2]
- if {$i == ""} {
+ if {[string length $i] == 0} {
for {set j 1} {$j <= 3} {incr j} {
if {[egw_form scan$j] != ""} {
set i $j
@@ -236,7 +239,7 @@ proc start-scan {scanNo targetNo cache dir initSet} {
}
}
}
- if {$i != ""} {
+ if {[string length $i] != 0} {
set scanNo 1000
set hist($setNo,scan) $i
set termPlusAttr [build-scan $hist($setNo,0,host) $i]
@@ -248,7 +251,7 @@ proc start-scan {scanNo targetNo cache dir initSet} {
return
}
set query [build-query $hist($setNo,0,host) 3]
- if {"x$query" == "x"} {
+ if {[string length $query] == 0} {
html " WWW/Z39.50 Gateway Search\n\n"
displayError "Empty query" \
"You must specify at least one search word"
@@ -269,7 +272,7 @@ proc start-scan {scanNo targetNo cache dir initSet} {
set setNo $nextSetNo
incr nextSetNo
} else {
- catch {unset hist($setNo,hits)}
+ catch {unset hist($setNo,$targetNo,hits)}
}
set hist($setNo,scan) 0
set hist($setNo,$targetNo,query) \
@@ -316,7 +319,6 @@ proc start-scan {scanNo targetNo cache dir initSet} {
html "env($n) = " $env($n) "
\n"
}
html "form: " [egw_form] "
\n"
- html "target: " $host "
\n"
html "databases: " $hist($setNo,$targetNo,database) "
\n"
html "selected: " [egw_form base] "
\n"
html "query: --" $hist($setNo,$targetNo,query) "--
"