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:
c260666
)
Eine Funktion zur Formatierung von Strings, die Vorkommen von "#n" durch das n-te...
author
Moritz Bunkus
<m.bunkus@linet-services.de>
Fri, 31 Aug 2007 15:39:49 +0000
(15:39 +0000)
committer
Moritz Bunkus
<m.bunkus@linet-services.de>
Fri, 31 Aug 2007 15:39:49 +0000
(15:39 +0000)
SL/Form.pm
patch
|
blob
|
history
diff --git
a/SL/Form.pm
b/SL/Form.pm
index
c4c7951
..
b32fbd2
100644
(file)
--- a/
SL/Form.pm
+++ b/
SL/Form.pm
@@
-758,6
+758,22
@@
sub format_amount {
return $amount;
}
#
+
+sub format_string {
+ $main::lxdebug->enter_sub(2);
+
+ my $self = shift;
+ my $input = shift;
+
+ $input =~ s/(^|[^\#]) \# (\d+) /$1$_[$2 - 1]/gx;
+ $input =~ s/(^|[^\#]) \#\{(\d+)\}/$1$_[$2 - 1]/gx;
+ $input =~ s/\#\#/\#/g;
+
+ $main::lxdebug->leave_sub(2);
+
+ return $input;
+}
+
sub parse_amount {
$main::lxdebug->enter_sub(2);