]> git.mxchange.org Git - mailer.git/blobdiff - inc/reset/reset_profile.php
Naming convention applied, wrapper functions may use __FUNCTION__ as first index
[mailer.git] / inc / reset / reset_profile.php
index efb8658339dd8cc4d661b083d8fe5acb3a3553a3..dd31930b0ed36cc77cc638f0f188428153aca833 100644 (file)
@@ -41,7 +41,7 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-} elseif ((getOutputMode() != 0) || (!isResetModeEnabled())) {
+} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
        // Do not execute when script is in CSS mode or no daily reset
        return;
 } elseif (!isExtensionActive('profile')) {
@@ -49,22 +49,22 @@ if (!defined('__SECURITY')) {
        return;
 }
 
-if ((getConfig('send_prof_update') == 'Y') && (getConfig('profile_update') > 0) && (getConfig('resend_profile_update'))) {
+if ((isSendProfileUpdateEnabled()) && (getProfileUpdate() > 0) && (getResendProfileUpdate() > 0)) {
        // Load personal data
-       $result = SQL_QUERY("SELECT `userid`, `email`, `last_update`, `joined`
+       $result = SQL_QUERY('SELECT `userid`, `email`, `last_update`, `joined`
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
        (`last_update` < (UNIX_TIMESTAMP() - {?profile_update?}) AND
-       `last_update` != 0 AND
+       `last_update` > 0 AND
        `last_profile_sent` < (UNIX_TIMESTAMP() - {?resend_profile_update?}))
 OR
-       (`last_update` = '0' AND `last_profile_sent` = '0' AND `joined` < (UNIX_TIMESTAMP() - {?profile_update?}))
+       (`last_update` = 0 AND `last_profile_sent` = 0 AND `joined` < (UNIX_TIMESTAMP() - {?profile_update?}))
 ORDER BY
-       `userid` ASC", __FILE__, __LINE__);
+       `userid` ASC', __FILE__, __LINE__);
 
        // Do we have some notifications to sent?
-       if (SQL_NUMROWS($result) > 0) {
+       if (!SQL_HASZERONUMS($result)) {
                // We need to send-out notifications...
                while ($content = SQL_FETCHARRAY($result)) {
                        // Translate timestamp
@@ -90,7 +90,7 @@ ORDER BY
 
        // Free result
        SQL_FREERESULT($result);
-}
+} // END - if
 
 // [EOF]
 ?>