/[webpac2]/Webpacus2/lib/Webpacus/Action/Search.pm
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /Webpacus2/lib/Webpacus/Action/Search.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 998 by dpavlin, Fri Nov 2 12:59:39 2007 UTC revision 999 by dpavlin, Sun Nov 4 17:03:55 2007 UTC
# Line 31  param field => Line 31  param field =>
31          },          },
32          render as 'Select';          render as 'Select';
33    
34    param database =>
35            label is _("From database"),
36            available are defer {
37                    my $coll = Webpacus::Model::SearchCollection->new;
38                    $coll->group_by( column => 'from_database' );
39                    $coll->unlimit;
40                    [{  
41                            display_from => 'from_database',
42                            value_from => 'from_database',
43                            collection => $coll,
44                    }];
45            },
46            render as 'Select';
47    
48  param query =>  param query =>
49          label is _("Search for"),          label is _("Search for"),
50          is mandatory;          is mandatory;
# Line 54  sub take_action { Line 68  sub take_action {
68    
69          my $search = Webpacus::Model::Search->load( $self->argument_value( 'field' ) );          my $search = Webpacus::Model::Search->load( $self->argument_value( 'field' ) );
70          my $query = $self->argument_value( 'query' );          my $query = $self->argument_value( 'query' );
71            my $database = $self->argument_value( 'database' );
72    
73          warn "## search = ",dump( $search );          warn "## search = ",dump( $search );
74    
75          my $index_path = Webpacus::Webpac->index_path;          my $index_path = Webpacus::Webpac->index_path;
76            $index_path .= '/' . $database;
77    
78          warn "## index_path = $index_path";          warn "## index_path = $index_path";
79    

Legend:
Removed from v.998  
changed lines
  Added in v.999

  ViewVC Help
Powered by ViewVC 1.1.26