- Daily/weekly/monthly reset completely rewritten
[mailer.git] / inc / modules / guest / action-online.php
index a030f9eff216dcbdbbc3eaad33caab411a7056b7..ec2317cbb5cc84d39afc0fb4b0960cee0836882d 100644 (file)
@@ -52,12 +52,9 @@ $total      = SQL_NUMROWS($result_guests) + SQL_NUMROWS($result_members) + SQL_N
 if ($_CONFIG['mad_counter'] < $total)
 {
        // Update counter
+       UPDATE_CONFIG(array("mad_timestamp", "mad_count"), array(time(), $total));
        $_CONFIG['mad_counter'] = $total;
        $_CONFIG['last_mad']    = time();
-       $result_mad = SQL_QUERY_ESC("UPDATE "._MYSQL_PREFIX."_config SET mad_timestamp=%s, mad_count='%s' WHERE config=0 LIMIT 1",
-        array($_CONFIG['last_mad'], $_CONFIG['mad_counter']), __FILE__, __LINE__);
-
-       // Destroy cache
 }
 
 // Put all values in constants for the template