Changeset 546


Ignore:
Timestamp:
Nov 9, 2004, 6:20:37 PM (17 years ago)
Author:
kake
Message:

Fixed bug where search results page was slightly ambiguous when no results found,

Location:
trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Changes

    r545 r546  
    22          not completely removed before.
    33        Improved the efficiency of the search.
     4        Fixed a couple of minor bugs in the search - note that node.tt
     5          and supersearch.tt have changed.
    46
    570.43    21 October 2004
  • trunk/t/31_supersearch.t

    r545 r546  
    99    plan skip_all => "DBD::SQLite not installed";
    1010} else {
    11     plan tests => 17;
     11    plan tests => 18;
    1212
    1313    # Clear out the database from any previous runs.
     
    5555    like( $output, qr/no items matched/i,
    5656          "outputs 'no items matched' if term not found" );
     57    unlike( $output, qr/matches found, showing/i,
     58            "doesn't output 'matches found, showing' if term not found" );
    5759
    5860    # Pop some data in and search again.
  • trunk/templates/supersearch.tt

    r545 r546  
    1313  [% IF search_terms %]
    1414  <h2>Search Results for <em>[% search_terms %]</em></h2>
    15   <h3>[% total_num %] matches found, showing [% first_num %] - [% last_num %]</h3>
     15    [% IF results.size %]
     16      <h3>[% total_num %] matches found, showing [% first_num %] - [% last_num %]</h3>
     17    [% END %]
    1618  [% ELSE %]
    1719  <h2>Search [% site_name %]</h2>
Note: See TracChangeset for help on using the changeset viewer.