]> git.mxchange.org Git - mailer.git/blobdiff - inc/functions.php
Fixed different results in admin overview page and inactivity list
[mailer.git] / inc / functions.php
index e9eb6681020ff46b822479f1b51822ea084c3321..73b15f55152c5c57495f721568788e44541d8a60 100644 (file)
@@ -569,13 +569,18 @@ function MAKE_DATETIME ($time, $mode="0")
 }
 
 // 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";
+
+       // Use from config is default
        $maxComma = $_CONFIG['max_comma'];
 
+       // Use from parameter?
+       if ($max > 0) $maxComma = $max;
+
        // Cut zeros off?
        if ($cut) {
                // Test for commata if in cut-mode
@@ -744,8 +749,11 @@ function LOAD_EMAIL_TEMPLATE($template, $content=array(), $UID="0") {
 
        // Is the admin logged in?
        if (IS_ADMIN()) {
+               // Get admin id
+               $aid = GET_ADMIN_ID(get_session('admin_login'));
+
                // Load Admin data
-               $ADMIN = GET_ADMIN_EMAIL(get_session('admin_login'));
+               $ADMIN = GET_ADMIN_EMAIL($aid);
        } // END - if
 
        // Neutral email address is default