Merge branch 'master' into 'master'
Fix #86: rel_dir no longer exists in Mojolicious. Use rel_file instead. See merge request !10
This commit is contained in:
commit
67dba4bf91
|
@ -37,12 +37,12 @@ sub startup {
|
||||||
shift @{$self->renderer->paths};
|
shift @{$self->renderer->paths};
|
||||||
shift @{$self->static->paths};
|
shift @{$self->static->paths};
|
||||||
if ($config->{theme} ne 'default') {
|
if ($config->{theme} ne 'default') {
|
||||||
my $theme = $self->home->rel_dir('themes/'.$config->{theme});
|
my $theme = $self->home->rel_file('themes/'.$config->{theme});
|
||||||
push @{$self->renderer->paths}, $theme.'/templates' if -d $theme.'/templates';
|
push @{$self->renderer->paths}, $theme.'/templates' if -d $theme.'/templates';
|
||||||
push @{$self->static->paths}, $theme.'/public' if -d $theme.'/public';
|
push @{$self->static->paths}, $theme.'/public' if -d $theme.'/public';
|
||||||
}
|
}
|
||||||
push @{$self->renderer->paths}, $self->home->rel_dir('themes/default/templates');
|
push @{$self->renderer->paths}, $self->home->rel_file('themes/default/templates');
|
||||||
push @{$self->static->paths}, $self->home->rel_dir('themes/default/public');
|
push @{$self->static->paths}, $self->home->rel_file('themes/default/public');
|
||||||
|
|
||||||
# Mail config
|
# Mail config
|
||||||
my $mail_config = {
|
my $mail_config = {
|
||||||
|
@ -55,7 +55,7 @@ sub startup {
|
||||||
$self->plugin('Mail' => $mail_config);
|
$self->plugin('Mail' => $mail_config);
|
||||||
|
|
||||||
# Internationalization
|
# Internationalization
|
||||||
my $lib = $self->home->rel_dir('themes/'.$config->{theme}.'/lib');
|
my $lib = $self->home->rel_file('themes/'.$config->{theme}.'/lib');
|
||||||
eval qq(use lib "$lib");
|
eval qq(use lib "$lib");
|
||||||
$self->plugin('I18N');
|
$self->plugin('I18N');
|
||||||
|
|
||||||
|
|
|
@ -22,10 +22,10 @@ sub startup {
|
||||||
# Themes handling
|
# Themes handling
|
||||||
shift @{$self->static->paths};
|
shift @{$self->static->paths};
|
||||||
if ($config->{theme} ne 'default') {
|
if ($config->{theme} ne 'default') {
|
||||||
my $theme = $self->home->rel_dir('themes/'.$config->{theme});
|
my $theme = $self->home->rel_file('themes/'.$config->{theme});
|
||||||
push @{$self->static->paths}, $theme.'/public' if -d $theme.'/public';
|
push @{$self->static->paths}, $theme.'/public' if -d $theme.'/public';
|
||||||
}
|
}
|
||||||
push @{$self->static->paths}, $self->home->rel_dir('themes/default/public');
|
push @{$self->static->paths}, $self->home->rel_file('themes/default/public');
|
||||||
|
|
||||||
$self->plugin('Mount' => {$config->{prefix} => File::Spec->catfile($Bin, '..', 'script', 'application')});
|
$self->plugin('Mount' => {$config->{prefix} => File::Spec->catfile($Bin, '..', 'script', 'application')});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue