Skip to content

Commit

Permalink
Put recent uri_for_static improvements back in place.
Browse files Browse the repository at this point in the history
  • Loading branch information
mateu committed May 25, 2010
1 parent 258f686 commit a8ff227
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
1 change: 1 addition & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

Bug fixes:
- Minor CSS fix (tcaine)
- default uri_for_static to use uri_for to make it work correctly for non-root-mounted wikis.
- Restrict page deletion to admin users only

Improvements:
Expand Down
5 changes: 4 additions & 1 deletion lib/MojoMojo.pm
Original file line number Diff line number Diff line change
Expand Up @@ -389,7 +389,10 @@ static has been remapped to .static

sub uri_for_static {
my ( $self, $asset ) = @_;
return ( $self->config->{static_path} || '/.static/' ) . $asset;
return
( defined($self->config->{static_path} )
? $self->config->{static_path} . $asset
: $self->uri_for('/.static', $asset) );
}

sub _cleanup_path {
Expand Down

0 comments on commit a8ff227

Please sign in to comment.