projects
/
kivitendo-erp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
663a364
)
print_html_template auch mit scalarrefs als file aufrufbar gemacht
author
Sven Schöling
<s.schoeling@linet-services.de>
Mon, 7 May 2012 16:42:41 +0000
(18:42 +0200)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Mon, 23 Jun 2014 11:23:44 +0000
(13:23 +0200)
Ausserdem die Fehlermeldung bei nicht korrektem aufruf mit header angeben.
SL/Form.pm
patch
|
blob
|
history
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
221f7b1
..
9f0cf11
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-594,8
+594,11
@@
sub _prepare_html_template {
if (-f "templates/webpages/${file}.html") {
$file = "templates/webpages/${file}.html";
+ } elsif (ref $file eq 'SCALAR') {
+ # file is a scalarref, use inline mode
} else {
my $info = "Web page template '${file}' not found.\n";
+ $::form->header;
print qq|<pre>$info</pre>|;
::end_of_request();
}