/[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 358 by dpavlin, Sun Jan 8 13:58:19 2006 UTC revision 359 by dpavlin, Sun Jan 8 14:52:24 2006 UTC
# Line 60  sub default : Private { Line 60  sub default : Private {
60    
61          my $site_name = shift @{ $c->req->args };          my $site_name = shift @{ $c->req->args };
62    
63            $c->log->debug("trying site name: $site_name");
64    
65          if (my $sites_root = $c->config->{sites_root}) {          if (my $sites_root = $c->config->{sites_root}) {
66                  my $site_path = $c->path_to('root', $sites_root, $site_name);                  my $site_path = $c->path_to('root', $sites_root, $site_name);
67    
68                  if (-e $site_path) {                  if (-e $site_path) {
69                          $c->stash->{site} = $site_name;                          $c->stash->{site} = $site_name;
70                          if (my $action = shift @{ $c->req->args }) {                          if (my $action = join('/', @{ $c->req->args })) {
71                                  $c->log->debug( "site: $site_name, action: $action" );                                  $c->log->debug( "site: $site_name, action: $action" );
72                                  $c->internal_redirect( $action, $c->stash );                                  # TODO can I really change base like this?
73                                    $c->stash->{base} = "/$site_name/" . $c->stash->{base}
74                                            unless ($c->stash->{base} =~ m#^/\Q$site_name\E/#);
75                                    $c->internal_redirect( $action, $c->stash, @{ $c->req->args } );
76                          } else {                          } else {
77                                  $c->log->debug( "site: $site_name" );                                  $c->log->debug( "site: $site_name" );
78                          }                          }

Legend:
Removed from v.358  
changed lines
  Added in v.359

  ViewVC Help
Powered by ViewVC 1.1.26