mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
1. 위젯/ 에디터컴포넌트의 코드 컴파일을 Context가 아닌 각 모듈이 trigger로 동작하게 개선 : 관리자 페이지에서 모듈 업데이트 필요 2. IE7에서 버튼 이미지가 어긋나는 문제 수정 3. 페이지 모듈의 캐싱 기능 추가 : 페이지 자체 캐시 가능하도록 함 4. 에디터에서 파일업로드시 파일 크기가 제대로 적용되지 않던 문제 수정 및 파일을 올리는 중에 남은 용량을 체크하여 미리 파일 업로드가 되지 않도록 함 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6103 201d5d3c-b55e-5fd7-737f-ddc643e51545
54 lines
1.9 KiB
PHP
54 lines
1.9 KiB
PHP
<?php
|
|
/**
|
|
* @class pageView
|
|
* @author zero (zero@nzeo.com)
|
|
* @brief page 모듈의 view 클래스
|
|
**/
|
|
|
|
class pageView extends page {
|
|
|
|
var $module_srl = 0;
|
|
var $list_count = 20;
|
|
var $page_count = 10;
|
|
|
|
/**
|
|
* @brief 초기화
|
|
**/
|
|
function init() {
|
|
// 템플릿 경로 구함 (page의 경우 tpl에 관리자용 템플릿 모아놓음)
|
|
$this->setTemplatePath($this->module_path.'tpl');
|
|
}
|
|
|
|
/**
|
|
* @brief 일반 요청시 출력
|
|
**/
|
|
function dispPageIndex() {
|
|
// 템플릿에서 사용할 변수를 Context::set()
|
|
if($this->module_srl) Context::set('module_srl',$this->module_srl);
|
|
|
|
// 캐시 파일 지정
|
|
$cache_file = sprintf("%sfiles/cache/page/%d.%s.cache.php", _XE_PATH_, $this->module_info->module_srl, Context::getLangType());
|
|
$interval = (int)($this->module_info->page_caching_interval);
|
|
if($interval>0) {
|
|
if(!file_exists($cache_file)) $mtime = 0;
|
|
else $mtime = filemtime($cache_file);
|
|
|
|
if($mtime + $interval*60 > time()) {
|
|
$page_content = FileHandler::readFile($cache_file);
|
|
} else {
|
|
$oWidgetController = &getController('widget');
|
|
$page_content = $oWidgetController->transWidgetCode($this->module_info->content);
|
|
FileHandler::writeFile($cache_file, $page_content);
|
|
}
|
|
} else {
|
|
if(file_exists($cache_file)) FileHandler::removeFile($cache_file);
|
|
$page_content = $this->module_info->content;
|
|
}
|
|
|
|
Context::set('module_info', $this->module_info);
|
|
Context::set('page_content', $page_content);
|
|
|
|
$this->setTemplateFile('content');
|
|
}
|
|
}
|
|
?>
|