]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-admins_mails.php
mailer project continued:
[mailer.git] / inc / modules / admin / what-admins_mails.php
index 39d7f99b38b05d000f2ccaf7f68d2d60002c7dd4..47f0fa9dfab9324916e8901d787ffa0d2bc47dcc 100644 (file)
@@ -16,7 +16,7 @@
  * $Author::                                                          $ *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
- * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
+ * Copyright (c) 2009 - 2012 by Mailer Developer Team                   *
  * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
@@ -71,7 +71,7 @@ if (isFormSent('edit')) {
                                        $OUT .= '>{--ADMIN_ADMINS_TO_USER_EVENTS--}</option>';
                                } // END - if
 
-                               $OUT .= generateOptionList('admins', 'id', 'login', $content['admin_id'], 'email');
+                               $OUT .= generateOptions('admins', 'id', 'login', $content['admin_id'], 'email');
                                $OUT .= '</select>';
 
                                // Transfer ids
@@ -85,9 +85,9 @@ if (isFormSent('edit')) {
                        // Prepare content
                        $content['id']            = $id;
                        $content['mail_template'] = $template;
-                       $content['admins']        = generateOptionList('admins', 'id', 'login', '', 'email');;
+                       $content['admins']        = generateOptions('admins', 'id', 'login', '', 'email');;
 
-                       if ($adminId2 > 0) {
+                       if (isValidUserId($adminId2)) {
                                // Add form for an additional admin
                                $OUT .= loadTemplate('admin_admins_mails_edit_form', true, $content);
                        } // END - if
@@ -137,7 +137,7 @@ ORDER BY
                                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) && (isPostRequestElementSet('template', $id))) {
+                               if ((!isValidUserId($content['admin_id'])) && (isPostRequestElementSet('template', $id))) {
                                        // Remove any other admin entries
                                        addSql(SQL_QUERY_ESC("DELETE LOW_PRIORITY FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE mail_template='%s' AND id != '%s'",
                                        array(postRequestElement('template', $id), $id), __FILE__, __LINE__, false));