]> git.mxchange.org Git - mailer.git/blobdiff - inc/reset/reset_100_bonus.php
The usual asset of bugfixes/improvements:
[mailer.git] / inc / reset / reset_100_bonus.php
index 87c197c2daf42757154e4c81d1793600c43ca509..265388459af8f4b4c8fb74dc6287709f57655e31 100644 (file)
@@ -14,8 +14,6 @@
  * $Date::                                                            $ *
  * $Tag:: 0.2.1-FINAL                                                 $ *
  * $Author::                                                          $ *
- * Needs to be in all Files and every File needs "svn propset           *
- * svn:keywords Date Revision" (autoprobset!) at least!!!!!!            *
  * -------------------------------------------------------------------- *
  * Copyright (c) 2003 - 2009 by Roland Haeder                           *
  * Copyright (c) 2009, 2010 by Mailer Developer Team                    *
@@ -40,7 +38,7 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-} elseif ((getScriptOutputMode() != 0) || (!isResetModeEnabled())) {
+} elseif ((!isHtmlOutputMode()) || (!isResetModeEnabled())) {
        // Do not execute when script is in CSS mode or no daily reset
        return;
 } elseif (!isExtensionActive('bonus')) {
@@ -48,6 +46,9 @@ if (!defined('__SECURITY')) {
        return;
 }
 
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset started.');
+
 // Check for 100% klickrate mails
 $result_bonus = SQL_QUERY("SELECT
        `id`, `userid`, `subject`, `timestamp_ordered`, `clicks`, `url`
@@ -60,7 +61,7 @@ WHERE
 ORDER BY
        `userid` ASC", __FILE__, __LINE__);
 
-if (SQL_NUMROWS($result_bonus) > 0) {
+if (!SQL_HASZERONUMS($result_bonus)) {
        // We found some mail orders...
        while ($content = SQL_FETCHARRAY($result_bonus)) {
                // Add points
@@ -86,5 +87,8 @@ if (SQL_NUMROWS($result_bonus) > 0) {
 // Free memory
 SQL_FREERESULT($result_bonus);
 
+// Debug line
+//* DEBUG: */ logDebugMessage(__FILE__, __LINE__, 'Daily reset ended.');
+
 // [EOF]
 ?>