Version 3.2.3

This commit is contained in:
Neo committed 2025-12-19 00:34:03 -08:00
1 parent ae5c01cc78
commit 78706903a2
2641 files changed
+228363 -201264

No files matched your search

@@ -1,21 +1,14 @@
<?php
/**
* <pre>
* Invision Power Services
* IP.Board v3.1.4
* Task: Prune back content cache
* Last Updated: $LastChangedDate: 2010-01-15 10:18:44 -0500 (Fri, 15 Jan 2010) $
* </pre>
*
* @author $Author: bfarber $
* @copyright (c) 2001 - 2009 Invision Power Services, Inc.
* @license http://www.invisionpower.com/community/board/license.html
* @package IP.Board
* @subpackage Core
* @link http://www.invisionpower.com
* @file contentcache.php Task to prune the content cache (posts & signatures)
*~TERABYTE_DOC_READY~
* $Copyright: (c) 2001 - 2011 Invision Power Services, Inc.$
* $License: This is NULLED!
* $Author: bfarber $
* @since 27th January 2004
* @version $Rev: 5713 $
* $LastChangedDate: 2011-03-18 21:17:06 -0400 (Fri, 18 Mar 2011) $
* @version v3.2.3
* $Revision: 8131 $
*/
if ( ! defined( 'IN_IPB' ) )
@@ -24,69 +17,51 @@ if ( ! defined( 'IN_IPB' ) )
exit();
}
/**
*
* @class task_item
* @brief Task to prune the content cache (posts & signatures)
*
*/
class task_item
{
/**
* Parent task manager class
* Object that stores the parent task manager class
*
* @access protected
* @var object
* @var $class
*/
protected $class;
/**
* This task data
*
* @access protected
* @var array
*/
protected $task = array();
/**
* Prevent logging
*
* @access protected
* @var boolean
*/
protected $restrict_log = false;
/**#@+
/**
* Array that stores the task data
*
* @var $task
*/
protected $task = array();
/**
* Registry Object Shortcuts
*
* @access protected
* @var object
* @var $registry
* @var $lang
*/
protected $registry;
protected $DB;
protected $settings;
protected $request;
protected $lang;
protected $member;
protected $cache;
/**#@-*/
/**
* Constructor
*
* @access public
* @param object ipsRegistry reference
* @param object Parent task class
* @param array This task data
* @return void
* @param object $registry Registry object
* @param object $class Task manager class object
* @param array $task Array with the task data
* @return @e void
*/
public function __construct( ipsRegistry $registry, $class, $task )
{
/* Make registry objects */
$this->registry = $registry;
$this->DB = $this->registry->DB();
$this->settings =& $this->registry->fetchSettings();
$this->request =& $this->registry->fetchRequest();
$this->lang = $this->registry->getClass('class_localization');
$this->member = $this->registry->member();
$this->memberData =& $this->registry->member()->fetchMemberData();
$this->cache = $this->registry->cache();
$this->caches =& $this->registry->cache()->fetchCaches();
$this->registry = $registry;
$this->lang = $this->registry->getClass('class_localization');
$this->class = $class;
$this->task = $task;
@@ -96,17 +71,17 @@ class task_item
/**
* Run this task
*
* @access public
* @return void
* @return @e void
*/
public function runTask()
{
/* Run it */
$itemsRemoved = IPSContentCache::prune();
$this->class->appendTaskLog( $this->task, "Cleaned up content cache - " . $itemsRemoved . " items removed" );
$log = ( $itemsRemoved === FALSE ) ? $this->lang->words['errorcleaningcontentcache'] : sprintf( $this->lang->words['contentcache_cleaned'], $itemsRemoved );
$this->class->appendTaskLog( $this->task, $log );
$this->class->unlockTask( $this->task );
}
}