update trunk / tag 1.4.2.2

git-svn-id: http://xe-core.googlecode.com/svn/trunk@7492 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
haneul 2010-05-27 07:35:42 +00:00
parent d448678c63
commit 6900f96319
27 changed files with 99 additions and 54 deletions

View file

@ -66,7 +66,7 @@
}
function truncate() {
apc_clear_cache('user');
return apc_clear_cache('user');
}
}
?>

View file

@ -19,10 +19,10 @@
if(!$info) $info = Context::getDBInfo();
if($info){
if($target == 'object'){
if($info->use_template_cache =='apc') $type = 'apc';
else if(substr($info->use_template_cache,0,8)=='memcache'){
if($info->use_object_cache =='apc') $type = 'apc';
else if(substr($info->use_object_cache,0,8)=='memcache'){
$type = 'memcache';
$url = $info->use_template_cache;
$url = $info->use_object_cache;
}
}else if($target == 'template'){
if($info->use_template_cache =='apc') $type = 'apc';

View file

@ -48,19 +48,22 @@
$files = array();
$hash = "";
foreach($source_files as $key => $file) {
if($file['file'][0] == '/')
{
if(!file_exists($_SERVER['DOCUMENT_ROOT'].$file['file'])) continue;
}
else if(!$file || !$file['file'] || !file_exists($file['file'])) continue;
$file['file'] = $source_files[$key]['file'] = str_replace("\\","/",$file['file']);
if(empty($file['optimized']) || preg_match('/^https?:\/\//i', $file['file']) ) $files[] = $file;
else{
if($file['file'][0] == '/'){
if(!file_exists($file['file'])){
if(file_exists($_SERVER['DOCUMENT_ROOT'] . $file['file'])){
if($file['optimized']) $source_files[$key]['file'] = $file['file'] = $_SERVER['DOCUMENT_ROOT'].$file['file'];
}else{
continue;
}
}
} else if(!$file || !$file['file'] || !file_exists($file['file'])) continue;
$file['file'] = $source_files[$key]['file'] = str_replace("\\","/",$file['file']);
if(empty($file['optimized']) || preg_match('/^https?:\/\//i', $file['file']) ) $files[] = $file;
else{
$targets[] = $file;
$hash .= $file['file'];
}
}
}
if(!count($targets)) return $this->_getOptimizedRemoved($files);
$list_file_hash = md5($hash);
$oCacheHandler = &CacheHandler::getInstance('template');
@ -71,7 +74,7 @@
$oCacheHandler->put($list_file_hash, $buff);
}
}else{
$list_file = FileHandler::getRealPath($this->cache_path . $list_file_hash);
$list_file = FileHandler::getRealPath($this->cache_path . $list_file_hash . '.info.php');
if(!file_exists($list_file)){
$str = '<?php $f=array();';
@ -81,6 +84,7 @@
FileHandler::writeFile($list_file, $str);
}
}
array_unshift($files, array('file' => sprintf($this->script_file, $list_file_hash, $type) , 'media' => 'all'));
$files = $this->_getOptimizedRemoved($files);
if(!count($files)) return $files;