]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-admins_mails.php
Fix for missing array element 'mails_sent'
[mailer.git] / inc / modules / admin / what-admins_mails.php
index f697968d7d488cf235c8e08bd51630d0edee1ff6..2bcea27674fa8388f2ee20bc0cadb43061f96d23 100644 (file)
@@ -51,7 +51,7 @@ if (isFormSent('edit')) {
                $rows = '';
                foreach (postRequestParameter('sel') as $template => $sel) {
                        // 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",
+                       $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'; $id = '0';
@@ -118,7 +118,7 @@ ORDER BY
 
        if (!SQL_HASZERONUMS($result)) {
                // Shall I change entries?
-               if (isFormSent('change')) {
+               if (isFormSent('do_edit')) {
                        // Init SQLs
                        initSqls();
 
@@ -129,7 +129,7 @@ ORDER BY
                                $content['admin_id'] = bigintval($content['admin_id']);
 
                                // Update entry
-                               addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins_mails` SET admin_id=%s WHERE `id`=%s ORDER BY `id` LIMIT 1",
+                               addSql(SQL_QUERY_ESC("UPDATE `{?_MYSQL_PREFIX?}_admins_mails` SET `admin_id`=%s WHERE `id`=%s ORDER BY `id` LIMIT 1",
                                        array($content['admin_id'], $id), __FILE__, __LINE__, false));
 
                                if (($content['admin_id'] < 1) && (isPostRequestParameterSet('template', $id))) {