Changeset 527
- Timestamp:
- 10/03/04 11:17:48 (4 years ago)
- Location:
- trunk
- Files:
-
- 1 added
- 4 modified
-
Changes (modified) (1 diff)
-
MANIFEST (modified) (1 diff)
-
lib/OpenGuides/SuperSearch.pm (modified) (5 diffs)
-
t/34_supersearch_paging.t (added)
-
templates/supersearch.tt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Changes
r524 r527 2 2 Handle distance searching with OpenGuides::Supersearch instead of 3 3 find_within_distance action. 4 Fixed bug with paging on distance-only search (reported by Bob Walker). 5 Improved encapsulation in OpenGuides::Supersearch - accessors. 4 6 5 7 0.41 21 September 2004 -
trunk/MANIFEST
r514 r527 60 60 t/32_supersearch_simple_metadata.t 61 61 t/33_supersearch_advanced_search.t 62 t/34_supersearch_paging.t 62 63 t/35_supersearch_two_searches.t 63 64 t/36_supersearch_order.t -
trunk/lib/OpenGuides/SuperSearch.pm
r478 r527 60 60 61 61 return $self; 62 } 63 64 =item B<wiki> 65 66 my $wiki = $search->wiki; 67 68 An accessor; returns the underlying L<CGI::Wiki> object. 69 70 =cut 71 72 sub wiki { 73 my $self = shift; 74 return $self->{wiki}; 75 } 76 77 =item B<config> 78 79 my $config = $search->config; 80 81 An accessor; returns the underlying L<Config::Tiny> object. 82 83 =cut 84 85 sub config { 86 my $self = shift; 87 return $self->{config}; 62 88 } 63 89 … … 151 177 if ( $self->{search_string} ) { 152 178 my %fuzzies = 153 $self-> {wiki}->fuzzy_title_match($self->{search_string});179 $self->wiki->fuzzy_title_match($self->{search_string}); 154 180 if ( $numres == 1 155 181 && !$self->{return_tt_vars} && scalar keys %fuzzies) { … … 208 234 209 235 my $output = OpenGuides::Template->output( 210 wiki => $self-> {wiki},211 config => $self-> {config},236 wiki => $self->wiki, 237 config => $self->config, 212 238 template => "supersearch.tt", 213 239 vars => $tt_vars, … … 224 250 my ($self, %args) = @_; 225 251 my ($op, @leaves) = @{ $args{tree} }; 226 my $wiki = $self-> {wiki};252 my $wiki = $self->wiki; 227 253 228 254 if ($op =~ /AND|OR/) { … … 335 361 } 336 362 } else { 337 my $wiki = $self-> {wiki};363 my $wiki = $self->wiki; 338 364 my @all_nodes = $wiki->list_all_nodes; 339 365 my $formatter = $wiki->formatter; -
trunk/templates/supersearch.tt
r526 r527 87 87 [% END %] 88 88 [% IF next_page_startpos %] 89 <a href="supersearch.cgi?search=[% search_terms %] &next=[% next_page_startpos %]">Next89 <a href="supersearch.cgi?search=[% search_terms %];distance_in_metres=[% dist %];os_x=[% os_x %];os_y=[% os_y %];next=[% next_page_startpos %]">Next 90 90 [% IF ((total_num - last_num >= 20)) %] 91 91 20
