From: Adam Dickmeiss Date: Fri, 22 Dec 1995 14:21:15 +0000 (+0000) Subject: More work on scan. The search.egw script takes care of cached X-Git-Url: http://lists.indexdata.dk/?a=commitdiff_plain;h=2213843897f0bc54bc535935c56fe830648b171a;p=egate.git More work on scan. The search.egw script takes care of cached query page (doesn't always increment nextSetNo). To make new search set either 'New query' must be selected or the query page must be reloaded. The msearch script doesn't do this yet, however. --- diff --git a/www/msearch.egw b/www/msearch.egw index 4ac4f3a..dfc71e9 100644 --- a/www/msearch.egw +++ b/www/msearch.egw @@ -1,6 +1,6 @@ { -# $Id: msearch.egw,v 1.6 1995/12/21 15:49:51 adam Exp $ +# $Id: msearch.egw,v 1.7 1995/12/22 14:21:15 adam Exp $ if {[info commands saveState] == ""} { source z39util.tcl @@ -27,7 +27,7 @@ incr nextSetNo for {set i 1} {$i <= $hist($setNo,0,host)} {incr i} { - set hist($setNo,$i,query) [build-query $hist($setNo,$i,host)] 3 + set hist($setNo,$i,query) [build-query $hist($setNo,$i,host) 3] } set hist($setNo,maxPresent) [wform hits] if {$hist($setNo,maxPresent) == ""} { diff --git a/www/search.egw b/www/search.egw index c72263e..7f1c0ef 100644 --- a/www/search.egw +++ b/www/search.egw @@ -1,6 +1,6 @@ { -# $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] diff --git a/www/wproto.c b/www/wproto.c index f46d710..ece3be5 100644 --- a/www/wproto.c +++ b/www/wproto.c @@ -41,7 +41,13 @@ * USE OR PERFORMANCE OF THIS SOFTWARE. * * $Log: wproto.c,v $ - * Revision 1.9 1995/11/14 16:31:36 adam + * Revision 1.10 1995/12/22 14:21:16 adam + * More work on scan. The search.egw script takes care of cached + * query page (doesn't always increment nextSetNo). To make new search set + * either 'New query' must be selected or the query page must be reloaded. + * The msearch script doesn't do this yet, however. + * + * Revision 1.9 1995/11/14 16:31:36 adam * Temporary remove of ccl entry. * * Revision 1.8 1995/11/13 15:41:45 adam @@ -127,7 +133,11 @@ void wo_clear (WCLIENT wc, char *type) if (!wc->outbuffer) wc->outbuffer = malloc(wc->outbuffer_size = OUTBUFFER_CHUNK); wc->outbuffer_offset = 0; +#if 0 + wo_printf(wc, "Expires: 0\nContent-type: %s\n\n", type); +#else wo_printf(wc, "Content-type: %s\n\n", type); +#endif } int wo_puthtml (WCLIENT wc, char *name) diff --git a/www/z39util.tcl b/www/z39util.tcl index 406662d..8035c60 100644 --- a/www/z39util.tcl +++ b/www/z39util.tcl @@ -1,5 +1,5 @@ # -# $Id: z39util.tcl,v 1.13 1995/12/21 15:49:53 adam Exp $ +# $Id: z39util.tcl,v 1.14 1995/12/22 14:21:16 adam Exp $ # proc saveState {} { uplevel #0 { @@ -331,7 +331,7 @@ proc display-full {zset no tno} { if {"x$url" != "x"} { html "
URL\n" if {"x$sp" == "x"} { - set sp reference + set sp $url } html {
} [join $sp] "\n" } @@ -605,9 +605,11 @@ proc z39search {setNo piggy tno elements} { return 0 } } else { - if {![catch [list $zz.$setNo smallSetUpperBound 0]]} { + if {[info exists hist($setNo,hits)] && \ + ![catch [list $zz.$setNo smallSetUpperBound 0]]} { return 1 } + } ir-set $zz.$setNo $zz diff --git a/www/ztargets.conf b/www/ztargets.conf index dde57c2..320515f 100644 --- a/www/ztargets.conf +++ b/www/ztargets.conf @@ -1,4 +1,4 @@ -# $Id: ztargets.conf,v 1.13 1995/11/16 14:09:42 adam Exp $ +# $Id: ztargets.conf,v 1.14 1995/12/22 14:21:17 adam Exp $ set commonFields { { Title {@attr 1=4} } { Author {@attr 1=1003} } @@ -63,17 +63,25 @@ set targets(dtbsun.dtv.dk:210) [list \ 0 \ ] -set targets(localhost:9999) [list \ - Ztest9999 \ - {ABE BETA} \ - $commonFields \ - {} \ - {Test server on localhost} \ - 1 \ -] +set targets(localhost:9999) { + Ztest9999 + {Default ABE BETA} + { + { Title {@attr 1=4} } + { Author {@attr 1=1003} } + { Abstract {@attr 1=62} } + { Date {@attr 1=30} } + { {Doc ID} {@attr 1=1032} } + { All {@attr 1=1016} } + { Ranked {@attr 1=1016 @attr 4=105} } + } + {} + {Test server on localhost} + 1 +} set targets(dtbsun.dtv.dk:9999) { - Zserver + Zebra {usgs esdd cd_rom iah} { { Title {@attr 1=4} } @@ -85,7 +93,7 @@ set targets(dtbsun.dtv.dk:9999) { { Ranked {@attr 1=1016 @attr 4=105} } } {} - {New Index Data Z39.50 Server in alpha-test} + {New Zebra Z39.50 Server in alpha-test} 1 }