improved search filter
This commit is contained in:
+4
-1
@@ -154,7 +154,10 @@ proc getfile {url} {
|
|||||||
} else {return {}}
|
} else {return {}}
|
||||||
}
|
}
|
||||||
https - http {
|
https - http {
|
||||||
set hs [::http::geturl $url -binary 1 -keepalive 0 -timeout 10000]
|
set hs ""
|
||||||
|
while {$hs eq ""} {
|
||||||
|
set hs [::http::geturl $url -binary 1 -keepalive 0 -timeout 10000]
|
||||||
|
}
|
||||||
if {[::http::ncode $hs] eq "200"} {
|
if {[::http::ncode $hs] eq "200"} {
|
||||||
return [::http::data $hs]
|
return [::http::data $hs]
|
||||||
} else {return {}}
|
} else {return {}}
|
||||||
|
|||||||
@@ -138,7 +138,8 @@ proc tiix_viewecho {} {
|
|||||||
sqlite3 msgdb $localdb -readonly true
|
sqlite3 msgdb $localdb -readonly true
|
||||||
set query {SELECT * FROM `msg` WHERE `echoname` = $tiix_echoname}
|
set query {SELECT * FROM `msg` WHERE `echoname` = $tiix_echoname}
|
||||||
if {$tiix_filter_regex ne {}} {
|
if {$tiix_filter_regex ne {}} {
|
||||||
append query { AND (`body` LIKE $tiix_filter_regex OR `subj` LIKE $tiix_filter_regex) }
|
set flt "%$tiix_filter_regex%"
|
||||||
|
append query { AND (`body` LIKE $flt OR `subj` LIKE $flt) }
|
||||||
}
|
}
|
||||||
if {$tiix_order_byid eq 1} {
|
if {$tiix_order_byid eq 1} {
|
||||||
append query { ORDER BY `id` }
|
append query { ORDER BY `id` }
|
||||||
|
|||||||
Reference in New Issue
Block a user