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:
eb1efd2
)
url_for: Template übergibt Hash-Parameter als Hash-Referenz
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 30 Dec 2010 15:20:09 +0000
(16:20 +0100)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Thu, 30 Dec 2010 15:20:09 +0000
(16:20 +0100)
SL/Controller/Base.pm
patch
|
blob
|
history
diff --git
a/SL/Controller/Base.pm
b/SL/Controller/Base.pm
index
d9b1783
..
112a7bd
100644
(file)
--- a/
SL/Controller/Base.pm
+++ b/
SL/Controller/Base.pm
@@
-14,9
+14,9
@@
sub parse_html_template {
sub url_for {
my $self = shift;
- return $_[0] if
scalar(@_) == 1
;
+ return $_[0] if
(scalar(@_) == 1) && !ref($_[0])
;
- my %params = @_;
+ my %params =
ref($_[0]) eq 'HASH' ? %{ $_[0] } :
@_;
my $controller = delete($params{controller}) || $self->_controller_name;
my $action = delete($params{action}) || 'dispatch';
$params{action} = "${controller}/${action}";