admin_cache_functions.php

来自「sabreipb 2.1.6 utf-8中文版本!」· PHP 代码 · 共 115 行

PHP
115
字号
<?php/*+--------------------------------------------------------------------------|   Invision Power Board v2.1.5|   =============================================|   by Matthew Mecham|   (c) 2001 - 2005 Invision Power Services, Inc.|   |   =============================================|   Web: |   Time: Wed, 01 Mar 2006 19:11:29 GMT|   Release: |   Licence Info: +---------------------------------------------------------------------------|   > $Date: 2005-10-14 18:52:45 +0100 (Fri, 14 Oct 2005) $|   > $Revision: 50 $|   > $Author: matt $+---------------------------------------------------------------------------||   > Admin Cache functions library|   > Script written by Matt Mecham|   > Date started: 20th January 2004||   > DBA Checked: Tue 25th May 2004+--------------------------------------------------------------------------*/class admin_cache_functions{	var $master_set = 1;	var $messages   = array();	var $no_rebuild = 0;	var $template   = "";		//-----------------------------------------	// Constructor	//-----------------------------------------		function admin_cache_functions()	{		//-----------------------------------------		// Get the libraries		//-----------------------------------------				require_once( KERNEL_PATH.'class_template.php' );				$this->template = new class_template();				$this->template->root_path = CACHE_PATH;	}		//============================================================================================================	// WRAPPER FUNCTIONS	//============================================================================================================		//-----------------------------------------	// WRAPPER: Update internal cache	//-----------------------------------------		function _recache_wrapper($id, $parent="", $root='1')	{		//-----------------------------------------		// Get wrapper from tree		//-----------------------------------------				$parent_in = $parent ? ','.$parent : '';				$this->ipsclass->DB->cache_add_query( 'cache_wrapper', array( 'id' => $id, 'parent_in' => $parent_in, 'root' => $root ) );		$this->ipsclass->DB->cache_exec_query();				$this_set = $this->ipsclass->DB->fetch_row();				$wrapper = $this_set['set_wrapper'];				//-----------------------------------------		// Get children details		//-----------------------------------------				$ids = array( 0 => array( 'set_skin_set_id' => $id ) );				if ( $id == 1 and IN_DEV )		{			$id = -1;		}				$this->ipsclass->DB->cache_add_query( 'cache_empty_wrapper', array( 'parent_id' => $id ) );		$this->ipsclass->DB->cache_exec_query();				while ( $r = $this->ipsclass->DB->fetch_row() )		{			$ids[] = $r;		}				if ( $id == -1 and IN_DEV )		{			$id = 1;		}				//-----------------------------------------		// Update this and child db		// caches		//-----------------------------------------				$theids = array();				foreach( $ids as $i => $d )		{			$theids[] = $d['set_skin_set_id'];		}				$this->ipsclass->DB->do_update( 'skin_sets', array( 'set_cache_wrapper' => $wrapper ), 'set_skin_set_id IN ('.implode(',',$theids).') AND set_skin_set_id != 1' );				$this->messages[] = "瀹屾垚灏佽

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?