Index: openacs-4/packages/search/www/search.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/www/search.adp,v diff -u -r1.14.10.1 -r1.14.10.2 --- openacs-4/packages/search/www/search.adp 5 Oct 2013 13:42:36 -0000 1.14.10.1 +++ openacs-4/packages/search/www/search.adp 3 Aug 2014 11:27:39 -0000 1.14.10.2 @@ -1,31 +1,27 @@ -Results +@context@ @page_title@ - -

#search.lt_You_must_specify_some#

+ + + #search.The# + [#search.details#]
+
- - - - #search.The# - [#search.details#]
-
-
- - - #search.lt_bstopwordsb_is_a_very# - [#search.details#]
-
-
- - - #search.lt_The_following_words_a# @stopwords@. - [#search.details#]
-
-
+ + + #search.lt_bstopwordsb_is_a_very# + [#search.details#]
+
+
+ + + #search.lt_The_following_words_a# @stopwords@. + [#search.details#]
+
+
- + Your search - @query@ - did not match any content.
#search.lt_No_pages_were_found_c#@query@".

#search.Suggestions# @@ -34,70 +30,69 @@
  • #search.lt_Try_different_keyword#
  • #search.lt_Try_more_general_keyw# -
  • #search.Try_fewer_keywords# +
  • #search.Try_fewer_keywords#
  • -
    - -
    -

    #search.Searched_for_query#

    -

    - #search.Results# @low@-@high@ #search.of_about# @count@#search.________Search_took# @elapsed@ #search.seconds# -

    -
    -
    -
      - -
    1. - - #search.Untitled# - @searchresult.title_summary;noquote@ - - -
      @searchresult.txt_summary;noquote@
      -
      -
      @searchresult.url_one@
      -
    2. -
      -
    -
    -
    +
    + +
    +

    #search.Searched_for_query#

    +

    + #search.Results# @low@-@high@ #search.of_about# @count@#search.________Search_took# @elapsed@ #search.seconds# +

    +
    +
    +
      + +
    1. + + #search.Untitled# + @searchresult.title_summary;noquote@ + + +
      @searchresult.txt_summary;noquote@
      +
      +
      @searchresult.url_one@
      +
    2. +
      +
    +
    +
    - -
    -
    -
    - - -
    -
    - -#search.lt_Tip_In_most_browsers_# - -
    +
    +
    +
    + + +
    +
    + + #search.lt_Tip_In_most_browsers_# + +
    - -

    #search.lt_Try_your_query_on_stw#

    + +

    #search.lt_Try_your_query_on_stw#

    +
    -
    - -

    #search.and_not_needed# [#search.details#]

    +

    #search.and_not_needed# [#search.details#]

    -

    #search.lt_bstopwordsb_is_a_very# [#search.details#]

    +

    #search.lt_bstopwordsb_is_a_very# [#search.details#]

    -

    #search.lt_The_following_words_a# [#search.details#]

    +

    #search.lt_The_following_words_a# [#search.details#]

    -

    #search.Searched_for_query#

    -

    #search.Results_count#

    +

    #search.Searched_for_query#

    +

    #search.Results_count#

    Index: openacs-4/packages/search/www/search.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/www/search.tcl,v diff -u -r1.37.2.5 -r1.37.2.6 --- openacs-4/packages/search/www/search.tcl 2 Aug 2014 10:45:43 -0000 1.37.2.5 +++ openacs-4/packages/search/www/search.tcl 3 Aug 2014 11:27:39 -0000 1.37.2.6 @@ -5,11 +5,11 @@ } { q:trim {t:trim ""} - {offset:integer 0} - {num:integer 0} + {offset:naturalnum 0} + {num:naturalnum 0} {dfs:trim ""} {dts:trim ""} - {search_package_id ""} + {search_package_id:naturalnum ""} {scope ""} {object_type ""} } -validate { @@ -27,7 +27,7 @@ set package_url [ad_conn package_url] set package_url_with_extras $package_url -set context results +set context Results set context_base_url $package_url # Do we want debugging information at the end of the page @@ -47,19 +47,6 @@ ad_script_abort } -if {[string trim $q] eq ""} { - set query {} - set empty_p 1 - set url_advanced_search "advanced-search" - ad_return_template - # FIXME DAVEB I don't understand why I can't call ad_script_abort here instead of return.... - # if I call ad_script_abort the adp is never rendered - return -} else { - set empty_p 0 -} - - if { $num <= 0} { set limit [parameter::get -package_id $package_id -parameter LimitDefault] } else { @@ -116,7 +103,7 @@ if {[callback::impl_exists -impl $driver -callback search::search]} { # DAVEB TODO Add subsite to the callback def? # FIXME do this in the intermedia driver! -# set final_query_string [db_string final_query_select "select site_wide_search.im_convert(:q) from dual"] + # set final_query_string [db_string final_query_select "select site_wide_search.im_convert(:q) from dual"] array set result [lindex [callback -impl $driver search::search -query $q -offset $offset -limit $limit \ -user_id $user_id -df $df \