more in naming convention applied, you should better kill inc/cache/*.cache files...
[mailer.git] / inc / reset / reset_daily.php
index c3b99df313c413adebdc4001827b5ebdf2082230..9768fbb59c5f2352050da79315aef9ee01b5f72f 100644 (file)
@@ -41,14 +41,14 @@ if (ereg(basename(__FILE__), $_SERVER['PHP_SELF']))
 // Update user profiles
 if (GET_EXT_VERSION("order") >= "0.1.1") {
        // Latest version
-       $result_daily = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET receive_mails=max_mails, mail_orders='0' WHERE receive_mails != max_mails", __FILE__, __LINE__);
+       $result_daily = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET receive_mails=max_mails, mail_orders=0 WHERE receive_mails != max_mails", __FILE__, __LINE__);
 } else {
        // Obsolete version
        $result_daily = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_user_data SET receive_mails=max_mails WHERE receive_mails != max_mails", __FILE__, __LINE__);
 }
 
 // Transfer points from locked_points to points
-$result_daily = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE ref_payout='0' AND status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__);
+$result_daily = SQL_QUERY("SELECT userid FROM "._MYSQL_PREFIX."_user_data WHERE ref_payout=0 AND status='CONFIRMED' ORDER BY userid", __FILE__, __LINE__);
 
 if (SQL_NUMROWS($result_daily) > 0)
 {
@@ -89,14 +89,14 @@ $_CONFIG['last_update'] = time();
 
 // Update database
 $result_daily = SQL_QUERY("UPDATE "._MYSQL_PREFIX."_config SET last_update=UNIX_TIMESTAMP()
-WHERE config='0' AND last_update != UNIX_TIMESTAMP() LIMIT 1", __FILE__, __LINE__);
+WHERE config=0 AND last_update != UNIX_TIMESTAMP() LIMIT 1", __FILE__, __LINE__);
 
 // Destroy cache
 if ((GET_EXT_VERSION("cache") >= "0.1.2") && (SQL_AFFECTEDROWS() == 1))
 {
-       if ($CACHE->cache_file("config", true))
+       if ($cacheInstance->cache_file("config", true))
        {
-               $CACHE->cache_replace("last_update", time(), "0", $CFG_CACHE);
+               $cacheInstance->cache_replace("last_update", time(), "0", $cacheArray);
        }
 }