Changeset 54 for server/trunk/web/lib/Sophie/Controller/Root.pm
- Timestamp:
- 11/30/10 04:47:31 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Controller/Root.pm
r50 r54 26 26 my ( $self, $c ) = @_; 27 27 28 if ($c->req->path =~ m:[^/]+\/ $:) {28 if ($c->req->path =~ m:[^/]+\/+$:) { 29 29 my $path = $c->req->path; 30 30 $path =~ s:/*$::; … … 33 33 } 34 34 35 if (!$c->stash->{ path}) {35 if (!$c->stash->{sitepath}) { 36 36 my @path; 37 my @reqpath = grep { $_ }split('/', $c->req->path);37 my @reqpath = split('/', $c->req->path); 38 38 foreach (@reqpath) { 39 39 push(@path, $_); 40 push(@{ $c->stash->{sitepath} }, { path => $c->uri_for('/', @path), name => $_ }); 40 push(@{ $c->stash->{sitepath} }, { path => $c->uri_for('/', @path), 41 name => $_ || '*' }); 41 42 } 42 43 }
Note: See TracChangeset
for help on using the changeset viewer.