b2evolution PHP Cross Reference Blogging Systems

Source: /inc/cron/jobs/_prune_hits_sessions.job.php - 29 lines - 716 bytes - Text - Print

Description: This file implements the Hit and Session pruning Cron controller

   1  <?php
   2  /**
   3   * This file implements the Hit and Session pruning Cron controller
   4   *
   5   * @author fplanque: Francois PLANQUE
   6   *
   7   * @version $Id: _prune_hits_sessions.job.php 5555 2014-01-03 00:10:21Z fplanque $
   8   */
   9  if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
  10  
  11  global $Settings;
  12  
  13  if( $Settings->get( 'auto_prune_stats_mode' ) != 'cron' )
  14  { // Autopruning is NOT requested
  15      $result_message = T_('Auto pruning is not set to run as a scheduled task');
  16      return 2;
  17  }
  18  
  19  load_class( 'sessions/model/_hitlist.class.php', 'Hitlist' );
  20  
  21  $result_message = Hitlist::dbprune(); // will prune once per day, according to Settings
  22  
  23  if( empty($result_message) )
  24  {
  25      return 1; /* ok */
  26  }
  27  
  28  return 100;
  29  ?>

title

Description

title

Description

title

Description

title

title

Body