캐시를 지우는 외부 툴 스크립트 추가. 파일을 핸들링할때 경로를 제대로 찾아서 처리할 수 있도록 코드 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4331 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2008-06-27 08:23:23 +00:00
parent 5d19990111
commit bdc194ab1d
41 changed files with 246 additions and 95 deletions

View file

@ -397,7 +397,7 @@
$this->deleteThumbnailFile($path."/".$entry);
} else {
if(!preg_match('/^thumbnail_([^\.]*)\.jpg$/i',$entry)) continue;
@unlink($path.'/'.$entry);
FileHandler::removeFile($path.'/'.$entry);
}
}
}

View file

@ -5,7 +5,7 @@
* @brief document 모듈의 high 클래스
**/
require_once('./modules/document/document.item.php');
require_once(_XE_PATH_.'modules/document/document.item.php');
class document extends ModuleObject {
@ -31,7 +31,7 @@
$oDB->addIndex("documents","idx_module_voted_count", array("module_srl","voted_count"));
$oDB->addIndex("documents","idx_module_notice", array("module_srl","is_notice"));
$oDB->addIndex("documents","idx_module_document_srl", array("module_srl","document_srl"));
$oDB->addIndex("documents","idx_module_blamed_count", array("module_srl","blamed_count"));
$oDB->addIndex("documents","idx_module_blamed_count", array("module_srl","blamed_count"));
// 2007. 10. 17 모듈이 삭제될때 등록된 글도 모두 삭제하는 트리거 추가
$oModuleController->insertTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after');
@ -182,30 +182,27 @@
**/
if(!$oDB->isIndexExists("documents","idx_module_document_srl")) $oDB->addIndex("documents","idx_module_document_srl", array("module_srl","document_srl"));
// 2008. 04. 23 blamed count 컬럼 추가
if(!$oDB->isColumnExists("documents", "blamed_count"))
{
$oDB->addColumn('documents', 'blamed_count', 'number', 11, 0, true);
$oDB->addIndex('documents', 'idx_blamed_count', array('blamed_count'));
}
// 2008. 04. 23 blamed count 컬럼 추가
if(!$oDB->isColumnExists("documents", "blamed_count")) {
$oDB->addColumn('documents', 'blamed_count', 'number', 11, 0, true);
$oDB->addIndex('documents', 'idx_blamed_count', array('blamed_count'));
}
if(!$oDB->isIndexExists("documents","idx_module_blamed_count"))
{
$oDB->addIndex('documents', 'idx_module_blamed_count', array('module_srl', 'blamed_count'));
}
if(!$oDB->isIndexExists("documents","idx_module_blamed_count")) {
$oDB->addIndex('documents', 'idx_module_blamed_count', array('module_srl', 'blamed_count'));
}
if(!$oDB->isColumnExists("document_voted_log", "point"))
$oDB->addColumn('document_voted_log', 'point', 'number', 11, 0, true);
return new Object(0,'success_updated');
}
if(!$oDB->isColumnExists("document_voted_log", "point"))
$oDB->addColumn('document_voted_log', 'point', 'number', 11, 0, true);
return new Object(0,'success_updated');
}
/**
* @brief 캐시 파일 재생성
**/
function recompileCache() {
// 게시글 분류 캐시 파일 삭제
FileHandler::removeFilesInDir("./files/cache/document_category");
FileHandler::removeFilesInDir(_XE_PATH_."files/cache/document_category");
}
/**

View file

@ -762,8 +762,8 @@
$category_list = $output->data;
if(!$category_list) {
@unlink($xml_file);
@unlink($php_file);
FileHandler::removeFile($xml_file);
FileHandler::removeFile($php_file);
return false;
}
if(!is_array($category_list)) $category_list = array($category_list);

View file

@ -455,7 +455,7 @@
if(file_exists($thumbnail_file)) {
$file_created_time = date("YmdHis",filemtime($thumbnail_file));
$modified_time = $this->get('last_update');
if($modified_time > $file_created_time) @unlink($thumbnail_file);
if($modified_time > $file_created_time) FileHandler::removeFile($thumbnail_file);
}
if(file_exists($thumbnail_file)&&filesize($thumbnail_file)<1) return;
@ -500,7 +500,7 @@
$tmp_file = sprintf('%sthumbnail_%d.tmp.jpg', $document_path, $width);
FileHandler::getRemoteFile($target_src, $tmp_file);
FileHandler::createImageFile($tmp_file, $thumbnail_file, $width, $height, 'jpg', $config->thumbnail_type);
@unlink($tmp_file);
FileHandler::removeFile($tmp_file);
return Context::getRequestUri().$thumbnail_file;
}