썸네일 생성시 매번 document.config를 가져오지 않도록 전역 변수화 시킴

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3420 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2007-12-27 02:51:04 +00:00
parent f39817c4cd
commit 8b3ec4c20d

View file

@ -353,11 +353,16 @@
function getThumbnail($width = 80, $height = 0, $thumbnail_type = '') {
if(!$height) $height = $width;
$thumbnail_type = '';
// 문서 모듈의 기본 설정에서 Thumbnail의 생성 방법을 구함
if(!in_array($thumbnail_type, array('crop','ratio'))) {
$oDocumentModel = &getModel('document');
$config = $oDocumentModel->getDocumentConfig();
$config = $GLOBALS['__document_config__'];
if(!$config) {
$oDocumentModel = &getModel('document');
$config = $oDocumentModel->getDocumentConfig();
$GLOBALS['__document_config__'] = $config;
}
$thumbnail_type = $config->thumbnail_type;
}