diff options
author | Ralph Amissah <ralph@amissah.com> | 2010-03-31 19:45:04 -0400 |
---|---|---|
committer | Ralph Amissah <ralph@amissah.com> | 2010-03-31 19:45:04 -0400 |
commit | 9ec3ebbcab149c92fada936fe7af6d91672a0908 (patch) | |
tree | 60b650949f8c0440895d790a4355e8f8ae1260d4 /lib/sisu/v1/cgi_sql_common.rb | |
parent | debian/changelog (2.0.4-1) (diff) | |
parent | update: changelog, version (2.0.5) (diff) |
Merge branch 'upstream' into debian/sid
Diffstat (limited to 'lib/sisu/v1/cgi_sql_common.rb')
-rw-r--r-- | lib/sisu/v1/cgi_sql_common.rb | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/lib/sisu/v1/cgi_sql_common.rb b/lib/sisu/v1/cgi_sql_common.rb index 9900ff43..5b2ef9b2 100644 --- a/lib/sisu/v1/cgi_sql_common.rb +++ b/lib/sisu/v1/cgi_sql_common.rb @@ -285,8 +285,8 @@ module SiSU_CGI_sql @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'] - elsif q['fns']=~/\S/; q['fns']ยท - end + elsif q['fns']=~/\S/; q['fns'] + end @@limit=q['ltd'] if q['ltd']=~/\d+/ # 1000 @@offset=q['off'] if q['off']=~/\d+/ # 0 end @@ -448,7 +448,9 @@ module SiSU_CGI_sql @@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + @offset_next.to_s end def previous - @offset_previous >= 0 ? (@@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + @offset_previous.to_s) : '' + @offset_previous >= 0 \ + ? (@@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + @offset_previous.to_s) \ + : '' end def start @@canned_search_url.to_s + '<d=' + sql_limit.to_s + '&off=' + 0.to_s @@ -877,14 +879,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 '' @@ -930,14 +933,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 |