]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-edit_emails.php
Fix for missing language string and variable renamed to better naming convention
[mailer.git] / inc / modules / admin / what-edit_emails.php
index f8e35fea0e7cec580a0d125ddc28b46fb73371b7..01880f16704002739a06db4aa12acf0d3cb9a594 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,13 @@ 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 +96,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>';