From: Sven Schöling Date: Thu, 25 Jan 2018 10:56:56 +0000 (+0100) Subject: Presenter::Tag::link - umbenannt in link_tag X-Git-Tag: release-3.5.4~503 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=9ed1603716e43626c764d45c3714ce9aaf4afe32;p=kivitendo-erp.git Presenter::Tag::link - umbenannt in link_tag um Namenskonflikte mit dem link builtin zu vermeiden --- diff --git a/SL/Presenter/Tag.pm b/SL/Presenter/Tag.pm index 696ec561e..80dca58f6 100644 --- a/SL/Presenter/Tag.pm +++ b/SL/Presenter/Tag.pm @@ -10,7 +10,7 @@ use Exporter qw(import); our @EXPORT_OK = qw( html_tag input_tag hidden_tag javascript man_days_tag name_to_id select_tag checkbox_tag button_tag submit_tag ajax_submit_tag input_number_tag - stringify_attributes restricted_html textarea_tag link date_tag + stringify_attributes restricted_html textarea_tag link_tag date_tag ); our %EXPORT_TAGS = (ALL => \@EXPORT_OK); @@ -323,13 +323,15 @@ sub textarea_tag { html_tag('textarea', $content, %attributes, name => $name); } -sub link { +sub link_tag { my ($href, $content, %params) = @_; $href ||= '#'; html_tag('a', $content, %params, href => $href); } +# alias for compatibility +sub link { goto &link_tag } sub date_tag { my ($name, $value, %params) = @_; diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index 7403ae4dc..b38365bf3 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -78,7 +78,7 @@ sub simple_format { return _call_presenter('simple_format', @_); } sub button_tag { return _call_presenter('button_tag', @_); } sub submit_tag { return _call_presenter('submit_tag', @_); } sub ajax_submit_tag { return _call_presenter('ajax_submit_tag', @_); } -sub link { return _call_presenter('link', @_); } +sub link { return _call_presenter('link_tag', @_); } sub input_number_tag { return _call_presenter('input_number_tag', @_); } sub textarea_tag { return _call_presenter('textarea_tag', @_); } sub date_tag { return _call_presenter('date_tag', @_); }