]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-edit_emails.php
Fix for missing array element 'userid', see ticket #205, thanks to piter01
[mailer.git] / inc / modules / admin / what-edit_emails.php
index f8e35fea0e7cec580a0d125ddc28b46fb73371b7..fdfe3c8bc03dff42e81d8e043acbb0304ed65ac0 100644 (file)
@@ -43,7 +43,7 @@ if ((!defined('__SECURITY')) || (!isAdmin())) {
 } // END - if
 
 // Add description as navigation point
-addMenuDescription('admin', __FILE__);
+addYouAreHereLink('admin', __FILE__);
 
 if ((isFormSent()) && (!isPostRequestParameterSet('id'))) {
        unsetPostRequestParameter('ok');
@@ -51,7 +51,7 @@ if ((isFormSent()) && (!isPostRequestParameterSet('id'))) {
 
 // Query the pool
 $result = SQL_QUERY('SELECT
-       `id`, `sender`, `subject`, `payment_id`, `cat_id`
+       `id`, `sender` AS `userid`, `subject`, `payment_id`, `cat_id`
 FROM
        `{?_MYSQL_PREFIX?}_pool`
 ORDER BY
@@ -61,7 +61,7 @@ ORDER BY
 if (!SQL_HASZERONUMS($result)) {
        if (isFormSent()) {
                // Make mail editable...
-               $result = SQL_QUERY_ESC("SELECT `id`, `subject`, `text`, `url` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1",
+               $result = SQL_QUERY_ESC("SELECT `id`, `sender` AS `userid`, `subject`, `text`, `url` FROM `{?_MYSQL_PREFIX?}_pool` WHERE `id`=%s LIMIT 1",
                        array(bigintval(postRequestParameter('id'))), __FILE__, __LINE__);
 
                // Fetch row
@@ -90,7 +90,7 @@ LIMIT 1",
                                bigintval(postRequestParameter('id')),
                        ), __FILE__, __LINE__);
 
-               if (SQL_AFFECTEDROWS() == 1) {
+               if (!SQL_HASZEROAFFECTED()) {
                        $content = '{--SETTINGS_SAVED--}';
                } else {
                        $content = '<span class="notice">{--SETTINGS_NOT_SAVED--}</span>';