]> git.mxchange.org Git - mailer.git/blobdiff - inc/modules/admin/what-admins_mails.php
Bad things are now 'classified' as bad (CSS class 'bad' is being used instead of...
[mailer.git] / inc / modules / admin / what-admins_mails.php
index 877022ce49175e09df835399c6e0dd65cf5325fe..39d7f99b38b05d000f2ccaf7f68d2d60002c7dd4 100644 (file)
@@ -17,7 +17,7 @@
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009 - 2011 by Mailer Developer Team                   *
- * For more information visit: http://www.mxchange.org                  *
+ * For more information visit: http://mxchange.org                      *
  *                                                                      *
  * This program is free software; you can redistribute it and/or modify *
  * it under the terms of the GNU General Public License as published by *
@@ -47,7 +47,6 @@ if (isFormSent('edit')) {
        // Check if entires are checked
        if (ifPostContainsSelections()) {
                // Add option for events
-               $adminsList = generateOptionList('admins', 'id', 'login', '', 'email');
                $rows = '';
                foreach (postRequestElement('sel') as $template => $sel) {
                        // First of all load data from DB
@@ -59,13 +58,19 @@ if (isFormSent('edit')) {
                                // @TODO Can this be rewritten to an API function?
                                $OUT .= '<select name="admin_id[' . $content['id'] . ']" size="1" class="form_select">
 <option value="0"';
-                               if ($content['admin_id'] == '0') $OUT .= ' selected="selected"';
+                               if (is_null($content['admin_id'])) {
+                                       $OUT .= ' selected="selected"';
+                               } // END - if
                                $OUT .= '>{--ADMIN_TO_ALL_ADMINS--}</option>';
+
                                if (isExtensionActive('events')) {
                                        $OUT .= '<option value="-1"';
-                                       if ($content['admin_id'] == '-1') $OUT .= ' selected="selected"';
+                                       if ($content['admin_id'] == '-1') {
+                                               $OUT .= ' selected="selected"';
+                                       } // END - if
                                        $OUT .= '>{--ADMIN_ADMINS_TO_USER_EVENTS--}</option>';
-                               }
+                               } // END - if
+
                                $OUT .= generateOptionList('admins', 'id', 'login', $content['admin_id'], 'email');
                                $OUT .= '</select>';
 
@@ -80,7 +85,7 @@ if (isFormSent('edit')) {
                        // Prepare content
                        $content['id']            = $id;
                        $content['mail_template'] = $template;
-                       $content['admins']        = $adminsList;
+                       $content['admins']        = generateOptionList('admins', 'id', 'login', '', 'email');;
 
                        if ($adminId2 > 0) {
                                // Add form for an additional admin