aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/sisu/v2/cgi_sql_common.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sisu/v2/cgi_sql_common.rb')
-rw-r--r--lib/sisu/v2/cgi_sql_common.rb27
1 files changed, 14 insertions, 13 deletions
diff --git a/lib/sisu/v2/cgi_sql_common.rb b/lib/sisu/v2/cgi_sql_common.rb
index f7b035db..0c3977c4 100644
--- a/lib/sisu/v2/cgi_sql_common.rb
+++ b/lib/sisu/v2/cgi_sql_common.rb
@@ -282,7 +282,7 @@ module SiSU_CGI_sql
@date_modified=q['dtm'] if q['dtm']=~/\S/
@date_available=q['dta'] if q['dta']=~/\S/
@date_valid=q['dtv'] if q['dtv']=~/\S/
- @filename=if q['doc'] and q['search'] !~/search db/; q['doc'] #if q['doc']; q['doc']
+ @filename=if q['doc'] and q['search'] !~/search db/; q['doc']
elsif q['fns']=~/\S/; q['fns']
end
@@limit=q['ltd'] if q['ltd']=~/\d+/ # 1000
@@ -446,7 +446,9 @@ module SiSU_CGI_sql
@@canned_search_url.to_s + '&ltd=' + sql_limit.to_s + '&off=' + @offset_next.to_s
end
def previous
- @offset_previous >= (0 ? (@@canned_search_url.to_s + '&ltd=' + sql_limit.to_s + '&off=' + @offset_previous.to_s) : '')
+ @offset_previous >= 0 \
+ ? (@@canned_search_url.to_s + '&ltd=' + sql_limit.to_s + '&off=' + @offset_previous.to_s) \
+ : ''
end
def start
@@canned_search_url.to_s + '&ltd=' + sql_limit.to_s + '&off=' + 0.to_s
@@ -851,9 +853,6 @@ module SiSU_CGI_sql
end
@counter_txt_ocn+=1
output=title+text
- #output=if c['seg'] =~/\S+/; title+text
- #else text #check
- #end
else #elsif cgi['view']=~/index/ #% idx body
if c['suffix'] !~/1/ #seg
index=%{<a href="#{@hosturl_files}/#{@stub}/#{location}/#{c['seg']}#{lang}.html##{c['ocn']}">#{c['ocn']}</a>, } if @text_search_flag
@@ -876,14 +875,15 @@ module SiSU_CGI_sql
end
@counters_txt=if @counter_txt_doc > 0
if checked_stats =~/\S/
- @@lt_t=if @counter_txt_ocn== dbi_statement.sql_limit.to_i
- over='over'
+ @@lt_t=if @counter_txt_ocn==dbi_statement.sql_limit.to_i
+ over_limit='over the limit set of'
+ over_this_number='more than'
true
else
- over=''
+ over_limit,over_this_number='',''
false
end
- %{<hr /><font size="2" color="#666666">Found in the main body of #{@counter_txt_doc} documents, and at #{over} #{@counter_txt_ocn} locations within.</font><br />}
+ %{<hr /><font size="2" color="#666666">Found in the main body of #{over_this_number} #{@counter_txt_doc} documents, and at #{over_limit} #{@counter_txt_ocn} locations within.</font><br />}
else ''
end
else ''
@@ -929,14 +929,15 @@ module SiSU_CGI_sql
end
@counters_endn=if @counter_endn_doc > 0
if checked_stats =~/\S/
- @@lt_e=if @counter_endn_ocn== dbi_statement.sql_limit.to_i
- over='over'
+ @@lt_e=if @counter_endn_ocn==dbi_statement.sql_limit.to_i
+ over_limit='over the limit set of'
+ over_this_number='more than'
true
else
- over=''
+ over_limit,over_this_number='',''
false
end
- %{<font size="2" color="#666666">Found in the endnotes of #{@counter_endn_doc} documents, and at #{over} #{@counter_endn_ocn} locations within.</font><br />}
+ %{<font size="2" color="#666666">Found in the endnotes of #{over_this_number} #{@counter_endn_doc} documents, and at #{over_limit} #{@counter_endn_ocn} locations within.</font><br />}
else ''
end
end