[ Index ]

PHP Cross Reference of phpwcms V1.4.7 _r403 (01.11.10)

title

Body

[close]

/include/inc_ext/bad-behavior/bad-behavior/ -> housekeeping.inc.php (source)

   1  <?php if (!defined('BB2_CORE')) die('I said no cheating!');
   2  
   3  function bb2_housekeeping($settings, $package)
   4  {
   5      // FIXME Yes, the interval's hard coded (again) for now.
   6      $query = "DELETE FROM `" . $settings['log_table'] . "` WHERE `date` < DATE_SUB('" . bb2_db_date() . "', INTERVAL 7 DAY)";
   7      bb2_db_query($query);
   8  
   9      // Waste a bunch more of the spammer's time, sometimes.
  10      if (rand(1,1000) == 1) {
  11          $query = "OPTIMIZE TABLE `" . $settings['log_table'] . "`";
  12          bb2_db_query($query);
  13      }
  14  }
  15  
  16  ?>


Generated: Tue Nov 16 22:51:00 2010 Cross-referenced by PHPXref 0.7