]> git.mxchange.org Git - mailer.git/blobdiff - inc/pool-update.php
pool delivery won't no longer work on daily reset, daily reset won't work in DEBUG_MO...
[mailer.git] / inc / pool-update.php
index a6ef8e18ebd34d3fdce5458053649154966eae7f..58a1bb91cd46172246c8e64a3708bde6103a49e0 100644 (file)
  ************************************************************************/
 
 // Some security stuff...
-if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
-{
+if (ereg(basename(__FILE__), $_SERVER['PHP_SELF'])) {
        $INC = substr(dirname(__FILE__), 0, strpos(dirname(__FILE__), "/inc") + 4) . "/security.php";
        require($INC);
 }
 
+// Don't run on daily reset
+if (defined('__DAILY_RESET')) {
+       // Skip here
+       return false;
+} // END - if
+
 // Test html extensions once
 $HTML_EXT = EXT_IS_ACTIVE("html_mail", true);
 
 // Check for freed mail orders to send out
-if ($HTML_EXT)
-{
+if ($HTML_EXT) {
        //                                0     1        2      3       4          5            6      7        8          9       10
        $result_main = SQL_QUERY("SELECT id, sender, subject, text, receivers, payment_id, timestamp, url, target_send, cat_id, html_msg FROM "._MYSQL_PREFIX."_pool WHERE data_type='NEW' ORDER BY timestamp DESC", __FILE__, __LINE__);
-}
- else
-{
+} else {
        //                                0     1        2      3       4          5            6      7        8          9    10
        $result_main = SQL_QUERY("SELECT id, sender, subject, text, receivers, payment_id, timestamp, url, target_send, cat_id, id FROM "._MYSQL_PREFIX."_pool WHERE data_type='NEW' ORDER BY timestamp DESC", __FILE__, __LINE__);
 }