]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/admin-inc.php
Performance hacks, encapsulation and more EL code usage:
[mailer.git] / inc / modules / admin / admin-inc.php
index 78d2469e4bf62b58ef28534a79e296b0e62abd1d..bce95acae4a5d8f8e7212e4026b2adc5d1e423f1 100644 (file)
@@ -165,15 +165,12 @@ function doAdminAction () {
        // Get action value
        $action = getActionFromModuleWhat(getModule(), $what);
 
-       // Define admin login name and id number
-       $content['login'] = getAdminLogin(getSession('admin_id'));
-       $content['id']    = getCurrentAdminId();
-
-       // Preload templates
+       // Load welcome template
        if (isExtensionActive('admins')) {
-               $content['welcome'] = loadTemplate('admin_welcome_admins', true, $content);
+               // @TODO This and the next getCurrentAdminId() call might be moved into the templates?
+               $content['welcome'] = loadTemplate('admin_welcome_admins', true, getCurrentAdminId());
        } else {
-               $content['welcome'] = loadTemplate('admin_welcome', true, $content);
+               $content['welcome'] = loadTemplate('admin_welcome', true, getCurrentAdminId());
        }
 
        // Load header, footer, render menu
@@ -1312,7 +1309,7 @@ function doVerifyExpertSettings () {
                                        // Is the element set, then we need to change the admin
                                        if (isPostRequestParameterSet('expert_settings')) {
                                                // Get it and prepare final post data array
-                                               $postData['login'][getCurrentAdminId()] = getAdminLogin(getCurrentAdminId());
+                                               $postData['login'][getCurrentAdminId()] = getCurrentAdminLogin();
                                                $postData['expert_warning'][getCurrentAdminId()] = 'N';
 
                                                // Change it in the admin