]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Referal overview completed, thanks to monakoianar for useful hints. :-)
[mailer.git] / inc / functions.php
index e9eb6681020ff46b822479f1b51822ea084c3321..291d865adba1237ce19a8942adc57650db4055a7 100644 (file)
@@ -569,13 +569,18 @@ function MAKE_DATETIME ($time, $mode="0")
 }
 
 // Translates the american decimal dot into a german comma
 }
 
 // Translates the american decimal dot into a german comma
-function TRANSLATE_COMMA ($dotted, $cut=true) {
+function TRANSLATE_COMMA ($dotted, $cut=true, $max=0) {
        global $_CONFIG;
 
        // Default is 3 you can change this in admin area "Misc -> Misc Options"
        if (empty($_CONFIG['max_comma'])) $_CONFIG['max_comma'] = "3";
        global $_CONFIG;
 
        // Default is 3 you can change this in admin area "Misc -> Misc Options"
        if (empty($_CONFIG['max_comma'])) $_CONFIG['max_comma'] = "3";
+
+       // Use from config is default
        $maxComma = $_CONFIG['max_comma'];
 
        $maxComma = $_CONFIG['max_comma'];
 
+       // Use from parameter?
+       if ($max > 0) $maxComma = $max;
+
        // Cut zeros off?
        if ($cut) {
                // Test for commata if in cut-mode
        // Cut zeros off?
        if ($cut) {
                // Test for commata if in cut-mode