/[webpac2]/Webpacus/lib/Webpacus.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 /Webpacus/lib/Webpacus.pm

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

revision 399 by dpavlin, Sun Feb 19 12:37:27 2006 UTC revision 455 by dpavlin, Sun May 7 21:45:50 2006 UTC
# Line 20  use Catalyst qw/-Debug Line 20  use Catalyst qw/-Debug
20  /;  /;
21  #       FormValidator  #       FormValidator
22    
23  our $VERSION = '0.33-dev';  use Encode qw/is_utf8 decode/;
24    
25    our $VERSION = '0.37-dev';
26    
27  #  #
28  # Configure the application  # Configure the application
# Line 59  sub default : Private { Line 61  sub default : Private {
61      my ( $self, $c ) = @_;      my ( $self, $c ) = @_;
62      $c->stash->{template} = 'index.tt';      $c->stash->{template} = 'index.tt';
63    
64          my $site_name = shift @{ $c->req->args };          my $site_name = shift @{ $c->req->args } || '';
65    
66          $c->log->debug("trying site name: $site_name");          $c->log->debug("trying site name: $site_name");
67    
# Line 106  sub end : Private { Line 108  sub end : Private {
108    
109                          $c->stash->{site_url} = "/$site_name/";                          $c->stash->{site_url} = "/$site_name/";
110    
111                          $c->log->dumper( $c->stash, 'stash' );                          #$c->log->dumper( $c->stash, 'stash' );
112    
113                  }                  }
114    
115                  # Forward to View unless response body is already defined                  # Forward to View unless response body is already defined
116                  $c->forward('View::TT');                  $c->forward('View::TT');
117    
118                  $c->fillform( $c->req->params );                  # oh, turn utf8 flag for all parametars (why do I need to do this?)
119                    my $utf8_params;
120                    map {
121                            $utf8_params->{$_} = decode('UTF-8', $c->request->params->{$_});
122                    } keys %{ $c->request->params };
123    
124                    # and fill-in form with new UTF-8 encoded params (to prevent double-escape of UTF-8)
125                    $c->fillform( $utf8_params );
126    
127                  $c->response->{body} =~ s#\Qnew Ajax.Autocompleter(\E#new WebPAC.Suggest(#gs;                  $c->response->{body} =~ s#\Qnew Ajax.Autocompleter(\E#new WebPAC.Suggest(#gs;
128                  $c->response->{body} =~ s#\Qnew Ajax.Updater(\E#new WebPAC.Updater(#gs;                  $c->response->{body} =~ s#\Qnew Ajax.Updater(\E#new WebPAC.Updater(#gs;

Legend:
Removed from v.399  
changed lines
  Added in v.455

  ViewVC Help
Powered by ViewVC 1.1.26