Failed SQL queries are now also reported in bug mails, SQL queries improved (more...
[mailer.git] / inc / libs / admins_functions.php
index e0424383fbfd88db20236932c865e1ce6a130017..8c692aa43b70c0b986b5edc1c4b3f814cd50479f 100644 (file)
@@ -420,7 +420,7 @@ function adminsListAdminAccounts() {
 }
 
 // Sends out mail to all administrators
-// IMPORTANT: Please use SEND_ADMIN_NOTIFCATION() for now!
+// IMPORTANT: Please use sendAdminNotification() instead of calling this function directly
 function sendAdminsEmails ($subj, $template, $content, $userid) {
        // Trim template name
        $template = trim($template);
@@ -463,7 +463,7 @@ function sendAdminsEmails ($subj, $template, $content, $userid) {
                                        $userid
                                ));
                        }
-               } elseif ($adminId == '0') {
+               } elseif (($adminId == '0') || (empty($adminId))) {
                        // Select all email adresses
                        $result = SQL_QUERY("SELECT `email` FROM `{?_MYSQL_PREFIX?}_admins` ORDER BY `id` ASC",
                                __FUNCTION__, __LINE__);