WIP - Load default template if does not exist (#1653)

environments/ppa-mbqj77/deployments/710^2
Christophe Maudoux 6 years ago
parent 9679a67163
commit 16cb5693dc
  1. 3
      lemonldap-ng-common/lib/Lemonldap/NG/Common/PSGI.pm

@ -242,6 +242,9 @@ sub sendHtml {
$args{headers} ||= $req->respHeaders || [];
my $htpl;
$template = ( $args{templateDir} // $self->templateDir ) . "/$template.tpl";
unless (-f $template){
$template = $self->templateDir . "/bootstrap/$template.tpl";
}
return $self->sendError( $req, "Unable to read $template", 500 )
unless ( -r $template and -f $template );
eval {

Loading…
Cancel
Save