mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 03:01:43 +09:00
moduleModel 및 moduleController에서 제공하던 각 모듈별 설정을 이용시 너무 많은 설정값들이 생길 경우 이를 serialize/ unserialize하는데 드는 부하가 커짐을 방지하기 위해서 module_config외에 module_part_config 테이블을 주고 module_srl 별 설정을 분산하도록 하여 쓸데없는 부하가 생기지 않도록 수정.
files/cache/module_info내에 있던 module_config 캐시 파일도 사용하지 않도록 변경 git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4696 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
cc7dd67ed2
commit
5934906056
41 changed files with 372 additions and 445 deletions
|
|
@ -358,11 +358,11 @@
|
|||
**/
|
||||
function procDocumentAdminInsertConfig() {
|
||||
// 기본 정보를 받음
|
||||
$args = Context::gets('thumbnail_type');
|
||||
$config = Context::gets('thumbnail_type');
|
||||
|
||||
// module Controller 객체 생성하여 입력
|
||||
$oModuleController = &getController('module');
|
||||
$output = $oModuleController->insertModuleConfig('document',$args);
|
||||
$output = $oModuleController->insertModuleConfig('document',$config);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -80,31 +80,23 @@
|
|||
}
|
||||
|
||||
function allowTrackback() {
|
||||
// allowTrackback()의 경우 여러번 호출됨으로 자체 변수 설정후 사용
|
||||
if(!isset($this->allow_trackback_status)) {
|
||||
|
||||
static $allow_trackback_status = null;
|
||||
if(is_null($allow_trackback_status)) {
|
||||
// 엮인글 관리 모듈의 사용금지 설정 상태이면 무조건 금지, 그렇지 않으면 개별 체크
|
||||
$oModuleModel = &getModel('module');
|
||||
$trackback_config = $oModuleModel->getModuleConfig('trackback');
|
||||
if(!isset($trackback_config->enable_trackback)) $trackback_config->enable_trackback = 'Y';
|
||||
|
||||
if($trackback_config->enable_trackback != 'Y') $this->allow_trackback_status = false;
|
||||
if($trackback_config->enable_trackback != 'Y') $allow_trackback_status = false;
|
||||
else {
|
||||
$module_srl = $this->get('module_srl');
|
||||
if(!$module_srl) $module_srl = Context::get('module_srl');
|
||||
|
||||
// 모듈별 설정을 체크
|
||||
$module_config = $trackback_config->module_config[$module_srl];
|
||||
|
||||
if($module_config->enable_trackback == 'N') $this->allow_trackback_status = false;
|
||||
else {
|
||||
// 글쓴이가 허용하였거나 원본 글이 없으면 허용
|
||||
if($this->get('allow_trackback')=='Y' || !$this->isExists()) $this->allow_trackback_status = true;
|
||||
}
|
||||
$module_config = $oModuleModel->getModulePartConfig('trackback', $module_srl);
|
||||
if($module_config->enable_trackback == 'N') $allow_trackback_status = false;
|
||||
else if($this->get('allow_trackback')=='Y' || !$this->isExists()) $allow_trackback_status = true;
|
||||
}
|
||||
}
|
||||
|
||||
return $this->allow_trackback_status;
|
||||
return $allow_trackback_status;
|
||||
}
|
||||
|
||||
function isLocked() {
|
||||
|
|
|
|||
|
|
@ -668,14 +668,12 @@
|
|||
* @brief 문서 설정 정보를 구함
|
||||
**/
|
||||
function getDocumentConfig() {
|
||||
if(!$GLOBLAS['__document_config__']) {
|
||||
if(!$GLOBLAS['__document_config__']) {
|
||||
$oModuleModel = &getModel('module');
|
||||
$config = $oModuleModel->getModuleConfig('document');
|
||||
|
||||
if(!$config->thumbnail_type) $config->thumbnail_type = 'crop';
|
||||
$GLOBLAS['__document_config__'] = $config;
|
||||
}
|
||||
|
||||
return $GLOBLAS['__document_config__'];
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue