Fix for rewritting code
authorRoland Häder <roland@mxchange.org>
Wed, 18 Nov 2009 04:17:52 +0000 (04:17 +0000)
committerRoland Häder <roland@mxchange.org>
Wed, 18 Nov 2009 04:17:52 +0000 (04:17 +0000)
inc/modules/admin/what-admins_mails.php

index 52079ff988879701020c0e8161cbe43be15c5b71..3f4159727d4e8c36ae765cc537c40ff508b2b7fb 100644 (file)
@@ -54,7 +54,8 @@ if (isPostRequestElementSet('edit')) {
                        // First of all load data from DB
                        $result = SQL_QUERY_ESC("SELECT `admin_id`, `id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `id` ASC",
                                array($template), __FILE__, __LINE__);
                        // First of all load data from DB
                        $result = SQL_QUERY_ESC("SELECT `admin_id`, `id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `id` ASC",
                                array($template), __FILE__, __LINE__);
-                       $OUT = ''; $adminId2 = '0';
+                       $OUT = '';
+                       $adminId2 = '0';
                        while ($content = SQL_FETCHARRAY($result)) {
                                // @TODO Can this be rewritten???
                                $OUT .= "<select name=\"admin_id[".$content['id']."]\" size=\"1\" class=\"admin_select\">
                        while ($content = SQL_FETCHARRAY($result)) {
                                // @TODO Can this be rewritten???
                                $OUT .= "<select name=\"admin_id[".$content['id']."]\" size=\"1\" class=\"admin_select\">
@@ -68,20 +69,18 @@ if (isPostRequestElementSet('edit')) {
                                }
                                $OUT .= generateOptionList('admins', 'id', 'login', $content['admin_id'], 'email');
                                $OUT .= "</select>\n<br />\n";
                                }
                                $OUT .= generateOptionList('admins', 'id', 'login', $content['admin_id'], 'email');
                                $OUT .= "</select>\n<br />\n";
-                               $adminId2 = $content['admin_id']; $id2 = $content['id'];
-                       }
+
+                               // Transfer ids
+                               $adminId2 = $content['admin_id'];
+                               $id2 = $content['id'];
+                       } // END - while
 
                        // Free memory
                        SQL_FREERESULT($result);
 
                        // Prepare content
 
                        // Free memory
                        SQL_FREERESULT($result);
 
                        // Prepare content
-                       $content = array(
-                               'sw'      => $SW,
-                               'id'      => $id,
-                               'id2'     => $id2,
-                               'tpl'     => $template,
-                               'admins'  => $adminsList
-                       );
+                       $content['sw']     = $SW;
+                       $content['admins'] = $adminsList;
 
                        if ($adminId2 > 0) {
                                // Add form for an additional admin
 
                        if ($adminId2 > 0) {
                                // Add form for an additional admin