X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=www%2Fsearch.egw;h=fd25d08ff8236d9404a0774351ee919a70b0e604;hb=a61ad0378b93e99e362a1d92c33d701dbf103eba;hp=425c829f5ab11c9c14323bc1530f02e1e29d099d;hpb=e406f6fe976eeae769f193a9d48938d903c02543;p=egate.git diff --git a/www/search.egw b/www/search.egw index 425c829..fd25d08 100644 --- a/www/search.egw +++ b/www/search.egw @@ -1,6 +1,6 @@ { -# $Id: search.egw,v 1.35 1996/03/08 16:47:05 adam Exp $ +# $Id: search.egw,v 1.38 1996/03/13 14:07:31 adam Exp $ proc start-scan {scanNo targetNo cache dir initSet} { global sessionId @@ -21,7 +21,7 @@ proc start-scan {scanNo targetNo cache dir initSet} { html "\n" set useIcons 1 - button-europagate + button-main if {$dir == "b"} { set lines 20 @@ -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] @@ -120,8 +120,8 @@ proc start-scan {scanNo targetNo cache dir initSet} { set useIcons 0 if {$hist($setNo,$scanNo,scanTerm) == ""} { - button-europagate - button-new-query 0 $setNo + button-main + button-new-query $setNo return } @@ -129,7 +129,7 @@ proc start-scan {scanNo targetNo cache dir initSet} { display-scan $setNo $scanNo 0 html "

\n" - button-europagate + button-main 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" @@ -192,7 +191,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,18 +213,21 @@ 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) == ""} { set hist($setNo,maxPresent) 30 } + set hist($setNo,format) brief + 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 @@ -233,7 +235,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] @@ -245,7 +247,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" @@ -266,7 +268,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) \ @@ -313,7 +315,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) "--
"