]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/admins_functions.php
Huge rewrite of default parameters, ext-network continued:
[mailer.git] / inc / libs / admins_functions.php
index 076213c0aea5ae2ba63b682c6d521b55a8245fbd..ed45da64a1bd0243017938599ffad490b712b6e7 100644 (file)
@@ -156,7 +156,7 @@ LIMIT 1",
 // Change a lot admin account
 function adminsChangeAdminAccount ($postData) {
        // Begin the update
 // Change a lot admin account
 function adminsChangeAdminAccount ($postData) {
        // Begin the update
-       $cache_update = 0;
+       $cache_update = '0';
        foreach ($postData['login'] as $id => $login) {
                // Secure id number
                $id = bigintval($id);
        foreach ($postData['login'] as $id => $login) {
                // Secure id number
                $id = bigintval($id);
@@ -339,7 +339,7 @@ function adminsDeleteAdminAccount ($postData) {
 // Remove the given accounts
 function adminsRemoveAdminAccount ($postData) {
        // Begin removal
 // Remove the given accounts
 function adminsRemoveAdminAccount ($postData) {
        // Begin removal
-       $cache_update = 0;
+       $cache_update = '0';
        foreach ($postData['sel'] as $id => $del) {
                // Secure id number
                $id = bigintval($id);
        foreach ($postData['sel'] as $id => $del) {
                // Secure id number
                $id = bigintval($id);
@@ -409,7 +409,7 @@ function sendAdminsEmails ($subj, $template, $content, $UID) {
        // Check which admin shall receive this mail
        $result = SQL_QUERY_ESC("SELECT `admin_id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `admin_id` ASC",
                array($template), __FUNCTION__, __LINE__);
        // Check which admin shall receive this mail
        $result = SQL_QUERY_ESC("SELECT `admin_id` FROM `{?_MYSQL_PREFIX?}_admins_mails` WHERE `mail_template`='%s' ORDER BY `admin_id` ASC",
                array($template), __FUNCTION__, __LINE__);
-       if (SQL_NUMROWS($result) == 0) {
+       if (SQL_NUMROWS($result) == '0') {
                // Create new entry (to all admins)
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (`admin_id`, `mail_template`) VALUES (0, '%s')",
                        array($template), __FUNCTION__, __LINE__);
                // Create new entry (to all admins)
                SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_admins_mails` (`admin_id`, `mail_template`) VALUES (0, '%s')",
                        array($template), __FUNCTION__, __LINE__);
@@ -441,7 +441,7 @@ function sendAdminsEmails ($subj, $template, $content, $UID) {
                                        $UID
                                ));
                        }
                                        $UID
                                ));
                        }
-               } elseif ($adminId == 0) {
+               } elseif ($adminId == '0') {
                        // Select all email adresses
                        $result = SQL_QUERY("SELECT `email` FROM `{?_MYSQL_PREFIX?}_admins` ORDER BY `id` ASC",
                                __FUNCTION__, __LINE__);
                        // Select all email adresses
                        $result = SQL_QUERY("SELECT `email` FROM `{?_MYSQL_PREFIX?}_admins` ORDER BY `id` ASC",
                                __FUNCTION__, __LINE__);