english comments added

git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0_english@8278 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
mosmartin 2011-04-06 16:48:06 +00:00
parent 693e215bc1
commit 4d272994dd
219 changed files with 6407 additions and 8705 deletions

View file

@ -2,29 +2,28 @@
/**
* @class documentAdminController
* @author NHN (developers@xpressengine.com)
* @brief document 모듈의 admin controller 클래스
* @brief document the module's admin controller class
**/
class documentAdminController extends document {
/**
* @brief 초기화
* @brief Initialization
**/
function init() {
}
/**
* @brief 관리자 페이지에서 선택된 문서들 삭제
* @brief Remove the selected docs from admin page
**/
function procDocumentAdminDeleteChecked() {
// 선택된 글이 없으면 오류 표시
// error appears if no doc is selected
$cart = Context::get('cart');
if(!$cart) return $this->stop('msg_cart_is_null');
$document_srl_list= explode('|@|', $cart);
$document_count = count($document_srl_list);
if(!$document_count) return $this->stop('msg_cart_is_null');
// 글삭제
// Delete a doc
$oDocumentController = &getController('document');
for($i=0;$i<$document_count;$i++) {
$document_srl = trim($document_srl_list[$i]);
@ -37,7 +36,7 @@
}
/**
* @brief 특정 게시물들의 소속 모듈 변경 (게시글 이동시에 사용)
* @brief change the module to move a specific article
**/
function moveDocumentModule($document_srl_list, $module_srl, $category_srl) {
if(!count($document_srl_list)) return;
@ -51,8 +50,7 @@
$triggerObj->document_srls = implode(',',$document_srl_list);
$triggerObj->module_srl = $module_srl;
$triggerObj->category_srl = $category_srl;
// Call trigger (before)
// Call a trigger (before)
$output = ModuleHandler::triggerCall('document.moveDocumentModule', 'before', $triggerObj);
if(!$output->toBool()) {
$oDB->rollback();
@ -68,8 +66,7 @@
unset($obj);
$obj = $oDocument->getObjectVars();
// 대상 모듈이 다를 경우 첨부파일 이동
// Move the attached file if the target module is different
if($module_srl != $obj->module_srl && $oDocument->hasUploadedFiles()) {
$oFileController = &getController('file');
@ -80,24 +77,21 @@
$file_info['name'] = $val->source_filename;
$inserted_file = $oFileController->insertFile($file_info, $module_srl, $obj->document_srl, $val->download_count, true);
if($inserted_file && $inserted_file->toBool()) {
// 이미지/동영상등일 경우
// for image/video files
if($val->direct_download == 'Y') {
$source_filename = substr($val->uploaded_filename,2);
$target_filename = substr($inserted_file->get('uploaded_filename'),2);
$obj->content = str_replace($source_filename, $target_filename, $obj->content);
// binary 파일일 경우
// For binary files
} else {
$obj->content = str_replace('file_srl='.$val->file_srl, 'file_srl='.$inserted_file->get('file_srl'), $obj->content);
$obj->content = str_replace('sid='.$val->sid, 'sid='.$inserted_file->get('sid'), $obj->content);
}
}
// 기존 파일 삭제
// Delete an existing file
$oFileController->deleteFile($val->file_srl);
}
// 등록된 모든 파일을 유효로 변경
// Set the all files to be valid
$oFileController->setFilesValid($obj->document_srl);
}
@ -105,8 +99,7 @@
{
$oDocumentController->deleteDocumentAliasByDocument($obj->document_srl);
}
// 게시물의 모듈 이동
// Move a module of the article
$obj->module_srl = $module_srl;
$obj->category_srl = $category_srl;
$output = executeQuery('document.updateDocumentModule', $obj);
@ -114,8 +107,7 @@
$oDB->rollback();
return $output;
}
// 카테고리가 변경되었으면 검사후 없는 카테고리면 0으로 세팅
// Set 0 if a new category doesn't exist after catergory change
if($source_category_srl != $category_srl) {
if($source_category_srl) $oDocumentController->updateCategoryCount($oDocument->get('module_srl'), $source_category_srl);
if($category_srl) $oDocumentController->updateCategoryCount($module_srl, $category_srl);
@ -125,8 +117,7 @@
$args->document_srls = implode(',',$document_srl_list);
$args->module_srl = $module_srl;
// 댓글의 이동
// move the comment
$output = executeQuery('comment.updateCommentModule', $args);
if(!$output->toBool()) {
$oDB->rollback();
@ -138,22 +129,19 @@
$oDB->rollback();
return $output;
}
// 엮인글의 이동
// move the trackback
$output = executeQuery('trackback.updateTrackbackModule', $args);
if(!$output->toBool()) {
$oDB->rollback();
return $output;
}
// 태그
// Tags
$output = executeQuery('tag.updateTagModule', $args);
if(!$output->toBool()) {
$oDB->rollback();
return $output;
}
// Call trigger (before)
// Call a trigger (before)
$output = ModuleHandler::triggerCall('document.moveDocumentModule', 'after', $triggerObj);
if(!$output->toBool()) {
$oDB->rollback();
@ -165,7 +153,7 @@
}
/**
* @brief 게시글의 복사
* @brief Copy the post
**/
function copyDocumentModule($document_srl_list, $module_srl, $category_srl) {
if(!count($document_srl_list)) return;
@ -191,8 +179,7 @@
$obj->password_is_hashed = true;
$obj->comment_count = 0;
$obj->trackback_count = 0;
// 첨부파일 미리 등록
// Pre-register the attachment
if($oDocument->hasUploadedFiles()) {
$files = $oDocument->getUploadedFiles();
foreach($files as $key => $val) {
@ -201,14 +188,12 @@
$file_info['name'] = $val->source_filename;
$oFileController = &getController('file');
$inserted_file = $oFileController->insertFile($file_info, $module_srl, $obj->document_srl, 0, true);
// 이미지/동영상등일 경우
// if image/video files
if($val->direct_download == 'Y') {
$source_filename = substr($val->uploaded_filename,2);
$target_filename = substr($inserted_file->get('uploaded_filename'),2);
$obj->content = str_replace($source_filename, $target_filename, $obj->content);
// binary 파일일 경우
// If binary file
} else {
$obj->content = str_replace('file_srl='.$val->file_srl, 'file_srl='.$inserted_file->get('file_srl'), $obj->content);
$obj->content = str_replace('sid='.$val->sid, 'sid='.$inserted_file->get('sid'), $obj->content);
@ -216,14 +201,13 @@
}
}
// 글의 등록
// Write a post
$output = $oDocumentController->insertDocument($obj, true);
if(!$output->toBool()) {
$oDB->rollback();
return $output;
}
// 댓글 이전
// Move the comments
if($oDocument->getCommentCount()) {
$oCommentModel = &getModel('comment');
$comment_output = $oCommentModel->getCommentList($document_srl, 0, true, 99999999);
@ -250,8 +234,7 @@
}
}
// 엮인글 이전
// Move the trackbacks
if($oDocument->getTrackbackCount()) {
$oTrackbackModel = &getModel('trackback');
$trackbacks = $oTrackbackModel->getTrackbackList($oDocument->document_srl);
@ -264,8 +247,7 @@
$output = executeQuery('trackback.insertTrackback', $trackback_obj);
if($output->toBool()) $success_count++;
}
// 엮인글 수 업데이트
// Update the number of trackbacks
$oDocumentController->updateTrackbackCount($obj->document_srl, $success_count);
}
}
@ -280,7 +262,7 @@
}
/**
* @brief 특정 모듈의 전체 문서 삭제
* @brief Delete all documents of the module
**/
function deleteModuleDocument($module_srl) {
$args->module_srl = $module_srl;
@ -289,20 +271,19 @@
}
/**
* @brief 문서 모듈의 기본설정 저장
* @brief Save the default settings of the document module
**/
function procDocumentAdminInsertConfig() {
// 기본 정보를 받음
// Get the basic information
$config = Context::gets('thumbnail_type');
// module Controller 객체 생성하여 입력
// Insert by creating the module Controller object
$oModuleController = &getController('module');
$output = $oModuleController->insertModuleConfig('document',$config);
return $output;
}
/**
* @brief 선택된 글들에 대해 신고 취소
* @brief Revoke declaration of the blacklisted posts
**/
function procDocumentAdminCancelDeclare() {
$document_srl = trim(Context::get('document_srl'));
@ -315,14 +296,12 @@
}
/**
* @brief 모든 생성된 섬네일 삭제
* @brief Delete all thumbnails
**/
function procDocumentAdminDeleteAllThumbnail() {
// files/attaches/images/ 디렉토리를 순환하면서 thumbnail_*.jpg 파일을 모두 삭제 (1.0.4 이전까지)
// delete all of thumbnail_ *. jpg files from files/attaches/images/ directory (prior versions to 1.0.4)
$this->deleteThumbnailFile('./files/attach/images');
// files/cache/thumbnails 디렉토리 자체를 삭제 (1.0.5 이후 변경된 섬네일 정책)
// delete a directory itself, files/cache/thumbnails (thumbnail policies have changed since version 1.0.5)
FileHandler::removeFilesInDir('./files/cache/thumbnails');
$this->setMessage('success_deleted');
@ -344,7 +323,7 @@
}
/**
* @brief 모듈의 확장 변수 추가 또는 수정
* @brief Add or modify extra variables of the module
**/
function procDocumentAdminInsertExtraVar() {
$module_srl = Context::get('module_srl');
@ -358,15 +337,14 @@
$eid = Context::get('eid');
if(!$module_srl || !$name || !$eid) return new Object(-1,'msg_invalid_request');
// idx가 지정되어 있지 않으면 최고 값을 지정
// set the max value if idx is not specified
if(!$var_idx) {
$obj->module_srl = $module_srl;
$output = executeQuery('document.getDocumentMaxExtraKeyIdx', $obj);
$var_idx = $output->data->var_idx+1;
}
// 이미 존재하는 모듈 이름인지 체크
// Check if the module name already exists
$obj->module_srl = $module_srl;
$obj->var_idx = $var_idx;
$obj->eid = $eid;
@ -384,7 +362,7 @@
}
/**
* @brief 모듈의 확장 변수 삭제
* @brief delete extra variables of the module
**/
function procDocumentAdminDeleteExtraVar() {
$module_srl = Context::get('module_srl');
@ -399,7 +377,7 @@
}
/**
* @brief 확장변수 순서 조절
* @brief control the order of extra variables
**/
function procDocumentAdminMoveExtraVar() {
$type = Context::get('type');
@ -419,8 +397,7 @@
if($type == 'up') $new_idx = $var_idx-1;
else $new_idx = $var_idx+1;
if($new_idx<1) return new Object(-1,'msg_invalid_request');
// 바꿀 idx가 없으면 바로 업데이트
// update immediately if there is no idx to change
if(!$extra_keys[$new_idx]) {
$args->module_srl = $module_srl;
$args->var_idx = $var_idx;
@ -429,7 +406,7 @@
if(!$output->toBool()) return $output;
$output = executeQuery('document.updateDocumentExtraVarIdx', $args);
if(!$output->toBool()) return $output;
// 있으면 기존의 꺼랑 교체
// replace if exists
} else {
$args->module_srl = $module_srl;
$args->var_idx = $new_idx;
@ -521,15 +498,13 @@
$oDB->rollback();
return $output;
}
// 임시 저장되었던 글이 아닌 경우, 등록된 첨부파일의 상태를 유효로 지정
// If the post was not temorarily saved, set the attachment's status to be valid
if($oDocument->hasUploadedFiles() && $document_args->member_srl != $document_args->module_srl) {
$args->upload_target_srl = $oDocument->document_srl;
$args->isvalid = 'Y';
executeQuery('file.updateFileValid', $args);
}
// trigger 호출 (after)
// call a trigger (after)
if($output->toBool()) {
$trigger_output = ModuleHandler::triggerCall('document.restoreTrash', 'after', $document_args);
if(!$trigger_output->toBool()) {

View file

@ -3,51 +3,45 @@
* @class documentAdminModel
* @author NHN (developers@xpressengine.com)
* @version 0.1
* @brief document 모듈의 admin model class
* @brief document the module's admin model class
**/
class documentAdminModel extends document {
/**
* @brief 초기화
* @brief Initialization
**/
function init() {
}
/**
* @brief 휴지통에 존재하는 문서 목록을 가져옴
* @brief get a document list from the trash
**/
function getDocumentTrashList($obj) {
// 정렬 대상과 순서 체크
// check a list and its order
if (!in_array($obj->sort_index, array('list_order','delete_date','title'))) $obj->sort_index = 'list_order';
if (!in_array($obj->order_type, array('desc','asc'))) $obj->order_type = 'asc';
// module_srl 대신 mid가 넘어왔을 경우는 직접 module_srl을 구해줌
// get a module_srl if mid is returned instead of modul_srl
if ($obj->mid) {
$oModuleModel = &getModel('module');
$obj->module_srl = $oModuleModel->getModuleSrlByMid($obj->mid);
unset($obj->mid);
}
// 넘어온 module_srl은 array일 수도 있기에 array인지를 체크
// check if the module_srl is an array
if (is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
else $args->module_srl = $obj->module_srl;
// 변수 체크
// Variable check
$args->sort_index = $obj->sort_index;
$args->order_type = $obj->order_type;
$args->page = $obj->page?$obj->page:1;
$args->list_count = $obj->list_count?$obj->list_count:20;
$args->page_count = $obj->page_count?$obj->page_count:10;
$args->member_srl = $obj->member_srl;
// query_id 지정
// Specify query_id
$query_id = 'document.getTrashList';
// query 실행
// Execute a query
$output = executeQueryArray($query_id, $args);
// 결과가 없거나 오류 발생시 그냥 return
// Return if no result or an error occurs
if (!$output->toBool() || !count($output->data)) return $output;
$idx = 0;
@ -71,7 +65,7 @@
}
/**
* @brief trash_srl값을 가지는 휴지통 문서를 가져옴
* @brief get the doc which has trash_srl from the trash can
**/
function getDocumentTrash($trash_srl) {
$args->trash_srl = $trash_srl;

View file

@ -2,82 +2,82 @@
/**
* @class documentAdminView
* @author NHN (developers@xpressengine.com)
* @brief document 모듈의 admin view 클래스
* @brief document admin view of the module class
**/
class documentAdminView extends document {
/**
* @brief 초기화
* @brief Initialization
**/
function init() {
}
/**
* @brief 목록 출력 (관리자용)
* @brief Display a list(administrative)
**/
function dispDocumentAdminList() {
// 목록을 구하기 위한 옵션
$args->page = Context::get('page'); ///< 페이지
$args->list_count = 30; ///< 한페이지에 보여줄 글 수
$args->page_count = 10; ///< 페이지 네비게이션에 나타날 페이지의 수
// option to get a list
$args->page = Context::get('page'); // /< Page
$args->list_count = 30; // /< the number of posts to display on a single page
$args->page_count = 10; // /< the number of pages that appear in the page navigation
$args->search_target = Context::get('search_target'); ///< 검색 대상 (title, contents...)
$args->search_keyword = Context::get('search_keyword'); ///< 검색어
$args->search_target = Context::get('search_target'); // /< search (title, contents ...)
$args->search_keyword = Context::get('search_keyword'); // /< keyword to search
$args->sort_index = 'list_order'; ///< 소팅 값
$args->sort_index = 'list_order'; // /< sorting value
$args->module_srl = Context::get('module_srl');
// 목록 구함, document->getDocumentList 에서 걍 알아서 다 해버리는 구조이다... (아.. 이거 나쁜 버릇인데.. ㅡ.ㅜ 어쩔수 없다)
// get a list
$oDocumentModel = &getModel('document');
$output = $oDocumentModel->getDocumentList($args);
// 템플릿에 쓰기 위해서 document_model::getDocumentList() 의 return object에 있는 값들을 세팅
// Set values of document_model::getDocumentList() objects for a template
Context::set('total_count', $output->total_count);
Context::set('total_page', $output->total_page);
Context::set('page', $output->page);
Context::set('document_list', $output->data);
Context::set('page_navigation', $output->page_navigation);
// 템플릿에서 사용할 검색옵션 세팅
// set a search option used in the template
$count_search_option = count($this->search_option);
for($i=0;$i<$count_search_option;$i++) {
$search_option[$this->search_option[$i]] = Context::getLang($this->search_option[$i]);
}
Context::set('search_option', $search_option);
// 템플릿 지정
// Specify a template
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('document_list');
}
/**
* @brief 문서 모듈 설정
* @brief Set a document module
**/
function dispDocumentAdminConfig() {
$oDocumentModel = &getModel('document');
$config = $oDocumentModel->getDocumentConfig();
Context::set('config',$config);
// 템플릿 파일 지정
// Set the template file
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('document_config');
}
/**
* @brief 관리자 페이지의 신고 목록 보기
* @brief display a report list on the admin page
**/
function dispDocumentAdminDeclared() {
// 목록을 구하기 위한 옵션
$args->page = Context::get('page'); ///< 페이지
$args->list_count = 30; ///< 한페이지에 보여줄 글 수
$args->page_count = 10; ///< 페이지 네비게이션에 나타날 페이지의 수
// option for a list
$args->page = Context::get('page'); // /< Page
$args->list_count = 30; // /< the number of posts to display on a single page
$args->page_count = 10; // /< the number of pages that appear in the page navigation
$args->sort_index = 'document_declared.declared_count'; ///< 소팅 값
$args->order_type = 'desc'; ///< 소팅 정렬 값
$args->sort_index = 'document_declared.declared_count'; // /< sorting values
$args->order_type = 'desc'; // /< sorting values by order
// 목록을 구함
// get a list
$declared_output = executeQuery('document.getDeclaredList', $args);
if($declared_output->data && count($declared_output->data)) {
@ -91,14 +91,13 @@
$declared_output->data = $document_list;
}
// 템플릿에 쓰기 위해서 document_model::getDocumentList() 의 return object에 있는 값들을 세팅
// Set values of document_model::getDocumentList() objects for a template
Context::set('total_count', $declared_output->total_count);
Context::set('total_page', $declared_output->total_page);
Context::set('page', $declared_output->page);
Context::set('document_list', $declared_output->data);
Context::set('page_navigation', $declared_output->page_navigation);
// 템플릿 지정
// Set the template
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('declared_list');
}
@ -130,28 +129,27 @@
}
function dispDocumentAdminTrashList() {
// 목록을 구하기 위한 옵션
$args->page = Context::get('page'); ///< 페이지
$args->list_count = 30; ///< 한페이지에 보여줄 글 수
$args->page_count = 10; ///< 페이지 네비게이션에 나타날 페이지의 수
// options for a list
$args->page = Context::get('page'); // /< Page
$args->list_count = 30; // /< the number of posts to display on a single page
$args->page_count = 10; // /< the number of pages that appear in the page navigation
$args->sort_index = 'list_order'; ///< 소팅 값
$args->order_type = 'desc'; ///< 소팅 정렬 값
$args->sort_index = 'list_order'; // /< sorting values
$args->order_type = 'desc'; // /< sorting values by order
$args->module_srl = Context::get('module_srl');
// 목록을 구함
// get a list
$oDocumentAdminModel = &getAdminModel('document');
$output = $oDocumentAdminModel->getDocumentTrashList($args);
// 템플릿에 쓰기 위해서 document_admin_model::getDocumentTrashList() 의 return object에 있는 값들을 세팅
// Set values of document_admin_model::getDocumentTrashList() objects for a template
Context::set('total_count', $output->total_count);
Context::set('total_page', $output->total_page);
Context::set('page', $output->page);
Context::set('document_list', $output->data);
Context::set('page_navigation', $output->page_navigation);
// 템플릿 지정
// set the template
$this->setTemplatePath($this->module_path.'tpl');
$this->setTemplateFile('document_trash_list');
}

View file

@ -2,21 +2,21 @@
/**
* @class document
* @author NHN (developers@xpressengine.com)
* @brief document 모듈의 high 클래스
* @brief document the module's high class
**/
require_once(_XE_PATH_.'modules/document/document.item.php');
class document extends ModuleObject {
// 관리자페이지에서 사용할 검색 옵션
var $search_option = array('title','content','title_content','user_name',); ///< 검색 옵션
// search option to use in admin page
var $search_option = array('title','content','title_content','user_name',); // /< Search options
/**
* @brief 설치시 추가 작업이 필요할시 구현
* @brief Implement if additional tasks are necessary when installing
**/
function moduleInstall() {
// action forward에 등록 (관리자 모드에서 사용하기 위함)
// Register action forward (to use in administrator mode)
$oModuleController = &getController('module');
$oDB = &DB::getInstance();
@ -29,8 +29,7 @@
$oDB->addIndex("documents","idx_module_blamed_count", array("module_srl","blamed_count"));
$oDB->addIndex("document_aliases", "idx_module_title", array("module_srl","alias_title"), true);
$oDB->addIndex("document_extra_vars", "unique_extra_vars", array("module_srl","document_srl","var_idx","lang_code"), true);
// 2007. 10. 17 모듈이 삭제될때 등록된 글도 모두 삭제하는 트리거 추가
// 2007. 10. 17 Add a trigger to delete all posts together when the module is deleted
$oModuleController->insertTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after');
// 2009. 01. 29 Added a trigger for additional setup
@ -40,67 +39,59 @@
}
/**
* @brief 설치가 이상이 없는지 체크하는 method
* @brief a method to check if successfully installed
**/
function checkUpdate() {
$oDB = &DB::getInstance();
$oModuleModel = &getModel('module');
/**
* 2007. 7. 25 : 알림 필드(notify_message) 추가
* 2007. 7. 25: Add a column(notify_message) for notification
**/
if(!$oDB->isColumnExists("documents","notify_message")) return true;
/**
* 2007. 8. 23 : document테이블에 결합 인덱스 적용
* 2007. 8. 23: create a clustered index in the document table
**/
if(!$oDB->isIndexExists("documents","idx_module_list_order")) return true;
if(!$oDB->isIndexExists("documents","idx_module_update_order")) return true;
if(!$oDB->isIndexExists("documents","idx_module_readed_count")) return true;
if(!$oDB->isIndexExists("documents","idx_module_voted_count")) return true;
// 2007. 10. 17 모듈이 삭제될때 등록된 글도 모두 삭제하는 트리거 추가
// 2007. 10. 17 Add a trigger to delete all posts together when the module is deleted
if(!$oModuleModel->getTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after')) return true;
// 2007. 10. 25 문서 분류에 parent_srl, expand를 추가
// 2007. 10. 25 add parent_srl, expand to the document category
if(!$oDB->isColumnExists("document_categories","parent_srl")) return true;
if(!$oDB->isColumnExists("document_categories","expand")) return true;
if(!$oDB->isColumnExists("document_categories","group_srls")) return true;
// 2007. 11. 20 게시글에 module_srl + is_notice 복합인덱스 만들기
// 2007. 11. 20 create a composite index on the columns(module_srl + is_notice)
if(!$oDB->isIndexExists("documents","idx_module_notice")) return true;
// 2008. 02. 18 게시글에 module_srl + document_srl 복합인덱스 만들기 (manian님 확인)
// 2008. 02. 18 create a composite index on the columns(module_srl + document_srl) (checked by Manian))
if(!$oDB->isIndexExists("documents","idx_module_document_srl")) return true;
/**
* 2007. 12. 03 : 확장변수(extra_vars) 컬럼이 없을 경우 추가
* 2007. 12. 03: Add if the colume(extra_vars) doesn't exist
**/
if(!$oDB->isColumnExists("documents","extra_vars")) return true;
// 2008. 04. 23 blamed count 컬럼 추가
// 2008. 04. 23 Add a column(blamed_count)
if(!$oDB->isColumnExists("documents", "blamed_count")) return true;
if(!$oDB->isIndexExists("documents","idx_module_blamed_count")) return true;
if(!$oDB->isColumnExists("document_voted_log", "point")) return true;
// 2008-12-15 문서 분류에 color를 추가
// 2008-12-15 Add a column(color)
if(!$oDB->isColumnExists("document_categories", "color")) return true;
/**
* 2009. 01. 29 : 확장변수 테이블에 lang_code가 없을 경우 추가
* 2009. 01. 29: Add a column(lang_code) if not exist in the document_extra_vars table
**/
if(!$oDB->isColumnExists("document_extra_vars","lang_code")) return true;
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before')) return true;
// 2009. 03. 09 documents에 lang_code 컬럼 추가
// 2009. 03. 09 Add a column(lang_code) to the documnets table
if(!$oDB->isColumnExists("documents","lang_code")) return true;
// 2009. 03. 11 확장변수 값 테이블의 인덱스 점검
// 2009. 03. 11 check the index in the document_extra_vars table
if(!$oDB->isIndexExists("document_extra_vars", "unique_extra_vars")) return true;
/**
* 2009. 03. 19 : 확장변수 테이블에 eid가 없을 경우 추가
* 2009. 03. 19: Add a column(eid) if not exist in the table
**/
if(!$oDB->isColumnExists("document_extra_keys","eid")) return true;
if(!$oDB->isColumnExists("document_extra_vars","eid")) return true;
@ -112,7 +103,7 @@
}
/**
* @brief 업데이트 실행
* @brief Execute update
**/
function moduleUpdate() {
$oDB = &DB::getInstance();
@ -120,14 +111,14 @@
$oModuleController = &getController('module');
/**
* 2007. 7. 25 : 알림 필드(notify_message) 추가
* 2007. 7. 25: Add a column(notify_message) for notification
**/
if(!$oDB->isColumnExists("documents","notify_message")) {
$oDB->addColumn('documents',"notify_message","char",1);
}
/**
* 2007. 8. 23 : document테이블에 결합 인덱스 적용
* 2007. 8. 23: create a clustered index in the document table
**/
if(!$oDB->isIndexExists("documents","idx_module_list_order")) {
$oDB->addIndex("documents","idx_module_list_order", array("module_srl","list_order"));
@ -144,30 +135,26 @@
if(!$oDB->isIndexExists("documents","idx_module_voted_count")) {
$oDB->addIndex("documents","idx_module_voted_count", array("module_srl","voted_count"));
}
// 2007. 10. 17 모듈이 삭제될때 등록된 글도 모두 삭제하는 트리거 추가
// 2007. 10. 17 Add a trigger to delete all posts together when the module is deleted
if(!$oModuleModel->getTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after'))
$oModuleController->insertTrigger('module.deleteModule', 'document', 'controller', 'triggerDeleteModuleDocuments', 'after');
// 2007. 10. 25 문서 분류에 parent_srl, expand를 추가
// 2007. 10. 25 add columns(parent_srl, expand)
if(!$oDB->isColumnExists("document_categories","parent_srl")) $oDB->addColumn('document_categories',"parent_srl","number",12,0);
if(!$oDB->isColumnExists("document_categories","expand")) $oDB->addColumn('document_categories',"expand","char",1,"N");
if(!$oDB->isColumnExists("document_categories","group_srls")) $oDB->addColumn('document_categories',"group_srls","text");
// 2007. 11. 20 게시글에 module_srl + is_notice 복합인덱스 만들기
// 2007. 11. 20 create a composite index on the columns(module_srl + is_notice)
if(!$oDB->isIndexExists("documents","idx_module_notice")) $oDB->addIndex("documents","idx_module_notice", array("module_srl","is_notice"));
/**
* 2007. 12. 03 : 확장변수(extra_vars) 컬럼이 없을 경우 추가
* 2007. 12. 03: Add if the colume(extra_vars) doesn't exist
**/
if(!$oDB->isColumnExists("documents","extra_vars")) $oDB->addColumn('documents','extra_vars','text');
/**
* 2008. 02. 18 게시글에 module_srl + document_srl 복합인덱스 만들기 (manian님 확인)
* 2008. 02. 18 create a composite index on the columns(module_srl + document_srl) (checked by Manian))
**/
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 컬럼 추가
// 2008. 04. 23 Add a column(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'));
@ -184,23 +171,21 @@
if(!$oDB->isColumnExists("document_categories","color")) $oDB->addColumn('document_categories',"color","char",7);
/**
* 2009. 01. 29 : 확장변수 테이블에 lang_code가 없을 경우 추가
* 2009. 01. 29: Add a column(lang_code) if not exist in the document_extra_vars table
**/
if(!$oDB->isColumnExists("document_extra_vars","lang_code")) $oDB->addColumn('document_extra_vars',"lang_code","varchar",10);
// 2009. 01. 29 Added a trigger for additional setup
if(!$oModuleModel->getTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before'))
$oModuleController->insertTrigger('module.dispAdditionSetup', 'document', 'view', 'triggerDispDocumentAdditionSetup', 'before');
// 2009. 03. 09 documents에 lang_code 컬럼 추가
// 2009. 03. 09 Add a column(lang_code) to the documnets table
if(!$oDB->isColumnExists("documents","lang_code")) {
$db_info = Context::getDBInfo();
$oDB->addColumn('documents',"lang_code","varchar",10, $db_info->lang_code);
$obj->lang_code = $db_info->lang_type;
executeQuery('document.updateDocumentsLangCode', $obj);
}
// 2009. 03. 11 확장변수 값 테이블의 인덱스 점검
// 2009. 03. 11 Check the index in the document_extra_vars table
if(!$oDB->isIndexExists("document_extra_vars", "unique_extra_vars")) {
$oDB->addIndex("document_extra_vars", "unique_extra_vars", array("module_srl","document_srl","var_idx","lang_code"), true);
}
@ -210,8 +195,8 @@
}
/**
* 2009. 03. 19 : 확장변수 테이블에 eid 없을 경우 추가
* 2009. 04. 12 : eid를 등록할 다른 필드 값이 변경되는 문제 수정 #17922959
* 2009. 03. 19: Add a column(eid)
* 2009. 04. 12: Fixed the issue(#17922959) that changes another column values when adding eid column
**/
if(!$oDB->isColumnExists("document_extra_keys","eid")) {
$oDB->addColumn("document_extra_keys","eid","varchar",40);
@ -251,10 +236,10 @@
}
/**
* @brief 캐시 파일 재생성
* @brief Re-generate the cache file
**/
function recompileCache() {
// 게시글 분류 캐시 파일 삭제
// Delete the cache files of document_category
FileHandler::removeFilesInDir(_XE_PATH_."files/cache/document_category");
}

File diff suppressed because it is too large Load diff

View file

@ -2,7 +2,7 @@
/**
* @class documentItem
* @author NHN (developers@xpressengine.com)
* @brief document 객체
* @brief document object
**/
class documentItem extends Object {
@ -40,8 +40,7 @@
$this->document_srl = $attribute->document_srl;
$this->lang_code = $attribute->lang_code;
$this->adds($attribute);
// 태그 정리
// Tags
if($this->get('tags')) {
$tags = explode(',',$this->get('tags'));
$tag_count = count($tags);
@ -95,15 +94,14 @@
function allowTrackback() {
static $allow_trackback_status = null;
if(is_null($allow_trackback_status)) {
// 엮인글 관리 모듈의 사용금지 설정 상태이면 무조건 금지, 그렇지 않으면 개별 체크
// If the trackback module is configured to be disabled, do not allow. Otherwise, check the setting of each module.
$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') $allow_trackback_status = false;
else {
$module_srl = $this->get('module_srl');
// 모듈별 설정을 체크
// Check settings of each module
$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;
@ -153,25 +151,20 @@
function notify($type, $content) {
if(!$this->document_srl) return;
// useNotify가 아니면 return
// return if it is not useNotify
if(!$this->useNotify()) return;
// 글쓴이가 로그인 유저가 아니면 패스~
// Pass if an author is not a logged-in user
if(!$this->get('member_srl')) return;
// 현재 로그인한 사용자와 글을 쓴 사용자를 비교하여 동일하면 return
// Return if the currently logged-in user is an author
$logged_info = Context::get('logged_info');
if($logged_info->member_srl == $this->get('member_srl')) return;
// 변수 정리
// List variables
if($type) $title = "[".$type."] ";
$title .= cut_str(strip_tags($content), 10, '...');
$content = sprintf('%s<br /><br />from : <a href="%s" target="_blank">%s</a>',$content, getFullUrl('','document_srl',$this->document_srl), getFullUrl('','document_srl',$this->document_srl));
$receiver_srl = $this->get('member_srl');
$sender_member_srl = $logged_info->member_srl;
// 쪽지 발송
// Send a message
$oCommunicationController = &getController('communication');
$oCommunicationController->sendMessage($sender_member_srl, $receiver_srl, $title, $content, false);
}
@ -263,13 +256,12 @@
$content = $this->get('content');
if(!$stripEmbedTagException) stripEmbedTagForAdmin($content, $this->get('member_srl'));
// rewrite모듈을 사용하면 링크 재정의
// Define a link if using a rewrite module
$oContext = &Context::getInstance();
if($oContext->allow_rewrite) {
$content = preg_replace('/<a([ \t]+)href=("|\')\.\/\?/i',"<a href=\\2". Context::getRequestUri() ."?", $content);
}
// 이 게시글을... 팝업메뉴를 출력할 경우
// To display a pop-up menu
if($add_popup_menu) {
$content = sprintf(
'%s<div class="document_popup_menu"><a href="#popup_menu_area" class="document_%d" onclick="return false">%s</a></div>',
@ -277,8 +269,7 @@
$this->document_srl, Context::getLang('cmd_document_do')
);
}
// 컨텐츠에 대한 조작이 가능한 추가 정보를 설정하였을 경우
// If additional content information is set
if($add_content_info) {
$content = sprintf(
'<!--BeforeDocument(%d,%d)--><div class="document_%d_%d xe_content">%s</div><!--AfterDocument(%d,%d)-->',
@ -288,12 +279,11 @@
$this->document_srl, $this->get('member_srl'),
$this->document_srl, $this->get('member_srl')
);
// 컨텐츠에 대한 조작이 필요하지 않더라도 xe_content라는 클래스명을 꼭 부여
// Add xe_content class although accessing content is not required
} else {
if($add_xe_content_class) $content = sprintf('<div class="xe_content">%s</div>', $content);
}
// resource_realpath가 true이면 내용내 이미지의 경로를 절대 경로로 변경
// Change the image path to a valid absolute path if resource_realpath is true
if($resource_realpath) {
$content = preg_replace_callback('/<img([^>]+)>/i',array($this,'replaceResourceRealPath'), $content);
}
@ -302,7 +292,7 @@
}
/**
* 에디터 코드가 변환된 내용 반환
* Return transformed content by Editor codes
**/
function getTransContent($add_popup_menu = true, $add_content_info = true, $resource_realpath = false, $add_xe_content_class = true) {
$oEditorController = &getController('editor');
@ -316,25 +306,25 @@
function getSummary($str_size = 50, $tail = '...') {
$content = $this->getContent(false,false);
// 줄바꿈이 있을 때, 공백문자 삽입
// For a newlink, inert a whitespace
$content = preg_replace('!(<br[\s]*/{0,1}>[\s]*)+!is', ' ', $content);
// </p>, </div>, </li> 등의 태그를 공백 문자로 치환
// Replace tags such as </p> , </div> , </li> and others to a whitespace
$content = str_replace(array('</p>', '</div>', '</li>'), ' ', $content);
// 태그 제거
// Remove Tags
$content = preg_replace('!<([^>]*?)>!is','', $content);
// < , > , " 를 치환
// Replace < , >, "
$content = str_replace(array('&lt;','&gt;','&quot;','&nbsp;'), array('<','>','"',' '), $content);
// 연속된 공백문자 삭제
// Delete a series of whitespaces
$content = preg_replace('/ ( +)/is', ' ', $content);
// 문자열을 자름
// Truncate string
$content = trim(cut_str($content, $str_size, $tail));
// >, <, "를 다시 복구
// Replace back < , <, "
$content = str_replace(array('<','>','"'),array('&lt;','&gt;','&quot;'), $content);
return $content;
@ -383,8 +373,7 @@
function getTrackbackUrl() {
if(!$this->document_srl) return;
// 스팸을 막기 위한 key 생성
// Generate a key to prevent spams
$oTrackbackModel = &getModel('trackback');
return $oTrackbackModel->getTrackbackUrl($this->document_srl);
}
@ -431,7 +420,7 @@
if($extra_vars)
{
// eid 명칭으로 확장변수 처리
// Handle extra variable(eid)
foreach($extra_vars as $idx => $key) {
$extra_eid[$key->eid] = $key;
}
@ -441,7 +430,7 @@
function getExtraEidValueHTML($eid) {
$extra_vars = $this->getExtraVars();
// eid 명칭으로 확장변수 처리
// Handle extra variable(eid)
foreach($extra_vars as $idx => $key) {
$extra_eid[$key->eid] = $key;
}
@ -461,33 +450,27 @@
function getComments() {
if(!$this->allowComment() || !$this->getCommentCount()) return;
if(!$this->isGranted() && $this->isSecret()) return;
// cpage는 댓글페이지의 번호
// cpage is a number of comment pages
$cpage = Context::get('cpage');
// 댓글 목록을 구해옴
// Get a list of comments
$oCommentModel = &getModel('comment');
$output = $oCommentModel->getCommentList($this->document_srl, $cpage, $is_admin);
if(!$output->toBool() || !count($output->data)) return;
// 구해온 목록을 commentItem 객체로 만듬
// 계층구조에 따라 부모글에 관리권한이 있으면 자식글에는 보기 권한을 줌
// Create commentItem object from a comment list
// If admin priviledge is granted on parent posts, you can read its child posts.
$accessible = array();
foreach($output->data as $key => $val) {
$oCommentItem = new commentItem();
$oCommentItem->setAttribute($val);
// 권한이 있는 글에 대해 임시로 권한이 있음을 설정
// If permission is granted to the post, you can access it temporarily
if($oCommentItem->isGranted()) $accessible[$val->comment_srl] = true;
// 현재 댓글이 비밀글이고 부모글이 있는 답글이고 부모글에 대해 관리 권한이 있으면 보기 가능하도록 수정
// If the comment is set to private and it belongs child post, it is allowable to read the comment for who has a admin privilege on its parent post
if($val->parent_srl>0 && $val->is_secret == 'Y' && !$oCommentItem->isAccessible() && $accessible[$val->parent_srl]===true) {
$oCommentItem->setAccessible();
}
$comment_list[$val->comment_srl] = $oCommentItem;
}
// 스킨에서 출력하기 위한 변수 설정
// Variable setting to be displayed on the skin
Context::set('cpage', $output->page_navigation->cur_page);
if($output->total_page>1) $this->comment_page_navigation = $output->page_navigation;
@ -514,16 +497,13 @@
}
function getThumbnail($width = 80, $height = 0, $thumbnail_type = '') {
// 존재하지 않는 문서일 경우 return false
// Return false if the document doesn't exist
if(!$this->document_srl) return;
// 높이 지정이 별도로 없으면 정사각형으로 생성
// If not specify its height, create a square
if(!$height) $height = $width;
// 첨부파일이 없거나 내용중 이미지가 없으면 return false;
// Return false if neither attachement nor image files in the document
if(!$this->get('uploaded_count') && !preg_match("!<img!is", $this->get('content'))) return;
// 문서 모듈의 기본 설정에서 Thumbnail의 생성 방법을 구함
// Get thumbnai_type information from document module's configuration
if(!in_array($thumbnail_type, array('crop','ratio'))) {
$config = $GLOBALS['__document_config__'];
if(!$config) {
@ -533,23 +513,19 @@
}
$thumbnail_type = $config->thumbnail_type;
}
// 섬네일 정보 정의
// Define thumbnail information
$thumbnail_path = sprintf('files/cache/thumbnails/%s',getNumberingPath($this->document_srl, 3));
$thumbnail_file = sprintf('%s%dx%d.%s.jpg', $thumbnail_path, $width, $height, $thumbnail_type);
$thumbnail_url = Context::getRequestUri().$thumbnail_file;
// 섬네일 파일이 있을 경우 파일의 크기가 0 이면 return false 아니면 경로 return
// Return false if thumbnail file exists and its size is 0. Otherwise, return its path
if(file_exists($thumbnail_file)) {
if(filesize($thumbnail_file)<1) return false;
else return $thumbnail_url;
}
// 대상 파일
// Target File
$source_file = null;
$is_tmp_file = false;
// 첨부된 파일중 이미지 파일이 있으면 찾음
// Find an iamge file among attached files if exists
if($this->get('uploaded_count')) {
$oFileModel = &getModel('file');
$file_list = $oFileModel->getFiles($this->document_srl);
@ -564,8 +540,7 @@
}
}
}
// 첨부된 파일이 없으면 내용중 이미지 파일을 구함
// If not exists, file an image file from the content
if(!$source_file) {
$content = $this->get('content');
$target_src = null;
@ -597,42 +572,39 @@
$output = FileHandler::createImageFile($source_file, $thumbnail_file, $width, $height, 'jpg', $thumbnail_type);
}
if($is_tmp_file) FileHandler::removeFile($source_file);
// 섬네일 생성 성공시 경로 return
// Return its path if a thumbnail is successfully genetated
if($output) return $thumbnail_url;
// 차후 다시 섬네일 생성을 시도하지 않기 위해 빈 파일을 생성
// Create an empty file not to re-generate the thumbnail
else FileHandler::writeFile($thumbnail_file, '','w');
return;
}
/**
* @brief 새글, 최신 업데이트글, 비밀글, 이미지/동영상/첨부파일등의 아이콘 출력용 함수
* $time_interval 지정된 시간() 새글/최신 업데이트글의 판별
* @brief Functions to display icons for new post, latest update, secret(private) post, image/video/attachment
* Determine new post and latest update by $time_interval
**/
function getExtraImages($time_interval = 43200) {
if(!$this->document_srl) return;
// 아이콘 목록을 담을 변수 미리 설정
// variables for icon list
$buffs = array();
$check_files = false;
// 비밀글 체크
// Check if secret post is
if($this->isSecret()) $buffs[] = "secret";
// 최신 시간 설정
// Set the latest time
$time_check = date("YmdHis", time()-$time_interval);
// 새글 체크
// Check new post
if($this->get('regdate')>$time_check) $buffs[] = "new";
else if($this->get('last_update')>$time_check) $buffs[] = "update";
/*
$content = $this->get('content');
// 사진 이미지 체크
// Check image files
preg_match_all('!<img([^>]*?)>!is', $content, $matches);
$cnt = count($matches[0]);
for($i=0;$i<$cnt;$i++) {
@ -642,26 +614,25 @@
break;
}
// 동영상 체크
// Check video files
if(preg_match('!<embed([^>]*?)>!is', $content) || preg_match('/editor_component=("|\')*multimedia_link/i', $content) ) {
$buffs[] = "movie";
$check_files = true;
}
*/
// 첨부파일 체크
// Check the attachment
if($this->hasUploadedFiles()) $buffs[] = "file";
return $buffs;
}
/**
* @brief getExtraImages로 구한 값을 이미지 태그를 씌워서 리턴
* @brief Return the value obtained from getExtraImages with image tag
**/
function printExtraImages($time_check = 43200) {
if(!$this->document_srl) return;
// 아이콘 디렉토리 구함
// Get the icon directory
$path = sprintf('%s%s',getUrl(), 'modules/document/tpl/icons/');
$buffs = $this->getExtraImages($time_check);
@ -693,7 +664,7 @@
}
/**
* @brief 에디터 html을 구해서 return
* @brief Return Editor html
**/
function getEditor() {
$module_srl = $this->get('module_srl');
@ -704,18 +675,18 @@
}
/**
* @brief 댓글을 있는지에 대한 권한 체크
* 게시글의 댓글 권한과 다른 부분
* @brief Check whether to have a permission to write comment
* Authority to write a comment and to write a document is separated
**/
function isEnableComment() {
// 권한이 없고 비밀글 or 댓글금지 or 댓글허용금지이면 return false
// Return false if not authorized, if a secret document, if the document is set not to allow any comment
if(!$this->isGranted() && ( $this->isSecret() || $this->isLocked() || !$this->allowComment() ) ) return false;
return true;
}
/**
* @brief 댓글 에디터 html을 구해서 return
* @brief Return comment editor's html
**/
function getCommentEditor() {
if(!$this->isEnableComment()) return;
@ -725,7 +696,7 @@
}
/**
* @brief 작성자의 프로필 이미지를 return
* @brief Return author's profile image
**/
function getProfileImage() {
if(!$this->isExists() || !$this->get('member_srl')) return;
@ -737,17 +708,15 @@
}
/**
* @brief 작성자의 서명을 return
* @brief Return author's signiture
**/
function getSignature() {
// 존재하지 않는 글이면 패스~
// Pass if a document doesn't exist
if(!$this->isExists() || !$this->get('member_srl')) return;
// 서명정보를 구함
// Get signature information
$oMemberModel = &getModel('member');
$signature = $oMemberModel->getSignature($this->get('member_srl'));
// 회원모듈에서 서명 최고 높이 지정되었는지 검사
// Check if a maximum height of signiture is set in the member module
if(!isset($GLOBALS['__member_signature_max_height'])) {
$oModuleModel = &getModel('module');
$member_config = $oModuleModel->getModuleConfig('member');
@ -762,7 +731,7 @@
}
/**
* @brief 내용내의 이미지 경로를 절대 경로로 변경
* @brief Change an image path in the content to absolute path
**/
function replaceResourceRealPath($matches) {
return preg_replace('/src=(["\']?)files/i','src=$1'.Context::getRequestUri().'files', $matches[0]);

View file

@ -2,45 +2,41 @@
/**
* @class documentModel
* @author NHN (developers@xpressengine.com)
* @brief document 모듈의 model 클래스
* @brief model class of the module document
**/
class documentModel extends document {
/**
* @brief 초기화
* @brief Initialization
**/
function init() {
}
/**
* @brief document대한 권한을 세션값으로 체크
* @brief document checked the permissions on the session values
**/
function isGranted($document_srl) {
return $_SESSION['own_document'][$document_srl];
}
/**
* @brief 확장변수를 문서마다 처리하지 않기 위해 매크로성으로 일괄 select 적용
* @brief extra variables for each article will not be processed bulk select and apply the macro city
**/
function setToAllDocumentExtraVars() {
static $checked_documents = array();
// XE에서 모든 문서 객체는 XE_DOCUMENT_LIST라는 전역 변수에 세팅을 함
// XE XE_DOCUMENT_LIST all documents that the object referred to the global variable settings
if(!count($GLOBALS['XE_DOCUMENT_LIST'])) return;
// 모든 호출된 문서 객체를 찾아서 확장변수가 설정되었는지를 확인
// Find all called the document object variable has been set extension
$document_srls = array();
foreach($GLOBALS['XE_DOCUMENT_LIST'] as $key => $val) {
if(!$val->document_srl || $checked_documents[$val->document_srl]) continue;
$checked_documents[$val->document_srl] = true;
$document_srls[] = $val->document_srl;
}
// 검출된 문서 번호가 없으면 return
// If the document number, return detected
if(!count($document_srls)) return;
// 확장변수 미지정된 문서에 대해서 일단 현재 접속자의 언어코드로 확장변수를 검색
// Expand variables mijijeongdoen article about a current visitor to the extension of the language code, the search variable
$obj->document_srl = implode(',',$document_srls);
$output = executeQueryArray('document.getDocumentExtraVars', $obj);
if($output->toBool() && $output->data) {
@ -62,8 +58,7 @@
$extra_keys = $this->getExtraKeys($module_srl);
$vars = $extra_vars[$document_srl];
$document_lang_code = $GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->get('lang_code');
// 확장변수 처리
// Expand the variable processing
if(count($extra_keys)) {
foreach($extra_keys as $idx => $key) {
$val = $vars[$idx];
@ -78,11 +73,9 @@
unset($evars);
$evars = new ExtraVar($module_srl);
$evars->setExtraVarKeys($extra_keys);
// 제목 처리
// Title Processing
if($vars[-1][$user_lang_code]) $GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->add('title',$vars[-1][$user_lang_code]);
// 내용 처리
// Information processing
if($vars[-2][$user_lang_code]) $GLOBALS['XE_DOCUMENT_LIST'][$document_srl]->add('content',$vars[-2][$user_lang_code]);
if($vars[-1][$user_lang_code] || $vars[-2][$user_lang_code]){
@ -94,7 +87,7 @@
}
/**
* @brief 문서 가져오기
* @brief Import Document
**/
function getDocument($document_srl=0, $is_admin = false, $load_extra_vars=true) {
if(!$document_srl) return new documentItem();
@ -110,7 +103,7 @@
}
/**
* @brief 여러개의 문서들을 가져옴 (페이징 아님)
* @brief Bringing multiple documents (or paging)
**/
function getDocuments($document_srls, $is_admin = false, $load_extra_vars=true) {
if(is_array($document_srls)) {
@ -157,29 +150,25 @@
}
/**
* @brief module_srl값을 가지는 문서의 목록을 가져옴
* @brief module_srl value, bringing the list of documents
**/
function getDocumentList($obj, $except_notice = false, $load_extra_vars=true) {
// 정렬 대상과 순서 체크
// Check the target and sequence alignment
if(!in_array($obj->sort_index, array('list_order','regdate','last_update','update_order','readed_count','voted_count','comment_count','trackback_count','uploaded_count','title','category_srl'))) $obj->sort_index = 'list_order';
if(!in_array($obj->order_type, array('desc','asc'))) $obj->order_type = 'asc';
// module_srl 대신 mid가 넘어왔을 경우는 직접 module_srl을 구해줌
// If that came across mid module_srl instead of a direct module_srl guhaejum
if($obj->mid) {
$oModuleModel = &getModel('module');
$obj->module_srl = $oModuleModel->getModuleSrlByMid($obj->mid);
unset($obj->mid);
}
// 넘어온 module_srl은 array일 수도 있기에 array인지를 체크
// Module_srl passed the array may be a check whether the array
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
else $args->module_srl = $obj->module_srl;
// 제외 module_srl에 대한 검사
// Except for the test module_srl
if(is_array($obj->exclude_module_srl)) $args->exclude_module_srl = implode(',', $obj->exclude_module_srl);
else $args->exclude_module_srl = $obj->exclude_module_srl;
// 변수 체크
// Variable check
$args->category_srl = $obj->category_srl?$obj->category_srl:null;
$args->sort_index = $obj->sort_index;
$args->order_type = $obj->order_type;
@ -189,39 +178,35 @@
$args->start_date = $obj->start_date?$obj->start_date:null;
$args->end_date = $obj->end_date?$obj->end_date:null;
$args->member_srl = $obj->member_srl;
// 카테고리가 선택되어 있으면 하부 카테고리까지 모두 조건에 추가
// Category is selected, further sub-categories until all conditions
if($args->category_srl) {
$category_list = $this->getCategoryList($args->module_srl);
$category_info = $category_list[$args->category_srl];
$category_info->childs[] = $args->category_srl;
$args->category_srl = implode(',',$category_info->childs);
}
// 기본으로 사용할 query id 지정 (몇가지 검색 옵션에 따라 query id가 변경됨)
// Used to specify the default query id (based on several search options to query id modified)
$query_id = 'document.getDocumentList';
// 내용검색일 경우 document division을 지정하여 검색하기 위한 처리
// If the search by specifying the document division naeyonggeomsaekil processed for
$use_division = false;
// 검색 옵션 정리
// Search options
$searchOpt->search_target = $obj->search_target;
$searchOpt->search_keyword = $obj->search_keyword;
$this->_setSearchOption($searchOpt, &$args, &$query_id, &$use_division);
/**
* division은 list_order의 asc 정렬일때만 사용할 있음
* list_order asc sort of division that can be used only when
**/
if($args->sort_index != 'list_order' || $args->order_type != 'asc') $use_division = false;
/**
* 만약 use_division이 true일 경우 document division을 이용하도록 변경
* If it is true, use_division changed to use the document division
**/
if($use_division) {
// 시작 division
// Division begins
$division = (int)Context::get('division');
// division값이 없다면 제일 상위
// If you do not value the best division top
if(!$division) {
$division_args->module_srl = $args->module_srl;
$division_args->exclude_module_srl = $args->exclude_module_srl;
@ -235,11 +220,9 @@
}
$division_args = null;
}
// 마지막 division
// The last division
$last_division = (int)Context::get('last_division');
// 지정된 division에서부터 5000개 후의 division값을 구함
// Division after division from the 5000 value of the specified Wanted
if(!$last_division) {
$last_division_args->module_srl = $args->module_srl;
$last_division_args->exclude_module_srl = $args->exclude_module_srl;
@ -255,8 +238,7 @@
}
}
// last_division 이후로 글이 있는지 확인
// Make sure that after last_division article
if($last_division) {
$last_division_args = null;
$last_division_args->module_srl = $args->module_srl;
@ -271,9 +253,8 @@
Context::set('division', $division);
Context::set('last_division', $last_division);
}
// document.getDocumentList 쿼리 실행
// 만약 query_id가 getDocumentListWithinComment 또는 getDocumentListWithinTag일 경우 group by 절 사용 때문에 쿼리를 한번더 수행
// document.getDocumentList query execution
// Query_id if you have a group by clause getDocumentListWithinTag getDocumentListWithinComment or used again to perform the query because
if(in_array($query_id, array('document.getDocumentListWithinComment', 'document.getDocumentListWithinTag'))) {
$group_args = clone($args);
$group_args->sort_index = 'documents.'.$args->sort_index;
@ -301,8 +282,7 @@
} else {
$output = executeQueryArray($query_id, $args);
}
// 결과가 없거나 오류 발생시 그냥 return
// Return if no result or an error occurs
if(!$output->toBool()||!count($output->data)) return $output;
$idx = 0;
@ -349,7 +329,7 @@
}
/**
* @brief module_srl값을 가지는 문서의 공지사항만 가져옴
* @brief module_srl value, bringing the document's gongjisa Port
**/
function getNoticeList($obj) {
$args->module_srl = $obj->module_srl;
@ -378,8 +358,8 @@
}
/**
* @brief document의 확장 변수 키값을 가져오는 함수
* $form_include : 작성시에 필요한 확장변수의 input form 추가 여부
* @brief function to retrieve the key values of the extended variable document
* $Form_include: writing articles whether to add the necessary extensions of the variable input form
**/
function getExtraKeys($module_srl) {
if(is_null($GLOBALS['XE_EXTRA_KEYS'][$module_srl])) {
@ -398,11 +378,11 @@
}
/**
* @brief 특정 document의 확장 변수 값을 가져오는 함수
* @brief A particular document to get the value of the extra variable function
**/
function getExtraVars($module_srl, $document_srl) {
if(!isset($GLOBALS['XE_EXTRA_VARS'][$document_srl])) {
// 확장변수 값을 추출하여 세팅
// Extended to extract the values of variables set
$oDocument = $this->getDocument($document_srl, false);
$GLOBALS['XE_DOCUMENT_LIST'][$document_srl] = $oDocument;
$this->setToAllDocumentExtraVars();
@ -412,27 +392,23 @@
}
/**
* @brief 선택된 게시물의 팝업메뉴 표시
* @brief Show pop-up menu of the selected posts
*
* 인쇄, 스크랩, 추천, 비추천, 신고 기능 추가
* Printing, scrap, recommendations and negative, reported the Add Features
**/
function getDocumentMenu() {
// 요청된 게시물 번호와 현재 로그인 정보 구함
// Post number and the current login information requested Wanted
$document_srl = Context::get('target_srl');
$mid = Context::get('cur_mid');
$logged_info = Context::get('logged_info');
$act = Context::get('cur_act');
// menu_list 에 "표시할글,target,url" 을 배열로 넣는다
// to menu_list "pyosihalgeul, target, url" put into an array
$menu_list = array();
// trigger 호출
// call trigger
ModuleHandler::triggerCall('document.getDocumentMenu', 'before', $menu_list);
$oDocumentController = &getController('document');
// 회원이어야만 가능한 기능
// Members must be a possible feature
if($logged_info->member_srl) {
$oDocumentModel = &getModel('document');
@ -444,40 +420,37 @@
$oModuleModel = &getModel('module');
$document_config = $oModuleModel->getModulePartConfig('document',$module_srl);
if($document_config->use_vote_up!='N' && $member_srl!=$logged_info->member_srl){
// 추천 버튼 추가
// Add a Referral Button
$url = sprintf("doCallModuleAction('document','procDocumentVoteUp','%s')", $document_srl);
$oDocumentController->addDocumentPopupMenu($url,'cmd_vote','./modules/document/tpl/icons/vote_up.gif','javascript');
}
if($document_config->use_vote_down!='N' && $member_srl!=$logged_info->member_srl){
// 비추천 버튼 추가
// Add button to negative
$url= sprintf("doCallModuleAction('document','procDocumentVoteDown','%s')", $document_srl);
$oDocumentController->addDocumentPopupMenu($url,'cmd_vote_down','./modules/document/tpl/icons/vote_down.gif','javascript');
}
// 신고 기능 추가
// Adding Report
$url = sprintf("doCallModuleAction('document','procDocumentDeclare','%s')", $document_srl);
$oDocumentController->addDocumentPopupMenu($url,'cmd_declare','./modules/document/tpl/icons/declare.gif','javascript');
// 스크랩 버튼 추가
// Add Bookmark button
$url = sprintf("doCallModuleAction('member','procMemberScrapDocument','%s')", $document_srl);
$oDocumentController->addDocumentPopupMenu($url,'cmd_scrap','./modules/document/tpl/icons/scrap.gif','javascript');
}
// 인쇄 버튼 추가
// Add print button
$url = getUrl('','module','document','act','dispDocumentPrint','document_srl',$document_srl);
$oDocumentController->addDocumentPopupMenu($url,'cmd_print','./modules/document/tpl/icons/print.gif','printDocument');
// trigger 호출 (after)
// Call a trigger (after)
ModuleHandler::triggerCall('document.getDocumentMenu', 'after', $menu_list);
// 관리자일 경우 ip로 글 찾기
// If you are managing to find posts by ip
if($logged_info->is_admin == 'Y') {
$oDocumentModel = &getModel('document');
$oDocument = $oDocumentModel->getDocument($document_srl);
if($oDocument->isExists()) {
// ip주소에 해당하는 글 찾기
// Find a post equivalent to ip address
$url = getUrl('','module','admin','act','dispDocumentAdminList','search_target','ipaddress','search_keyword',$oDocument->get('ipaddress'));
$icon_path = './modules/member/tpl/images/icon_management.gif';
$oDocumentController->addDocumentPopupMenu($url,'cmd_search_by_ipaddress',$icon_path,'TraceByIpaddress');
@ -486,23 +459,21 @@
$oDocumentController->addDocumentPopupMenu($url,'cmd_add_ip_to_spamfilter','./modules/document/tpl/icons/declare.gif','javascript');
}
}
// 팝업메뉴의 언어 변경
// Changing the language of pop-up menu
$menus = Context::get('document_popup_menu_list');
$menus_count = count($menus);
for($i=0;$i<$menus_count;$i++) {
$menus[$i]->str = Context::getLang($menus[$i]->str);
}
// 최종적으로 정리된 팝업메뉴 목록을 구함
// Wanted to finally clean pop-up menu list
$this->add('menus', $menus);
}
/**
* @brief module_srl해당하는 문서의 전체 갯수를 가져옴
* @brief module_srl the total number of documents that are bringing
**/
function getDocumentCount($module_srl, $search_obj = NULL) {
// 검색 옵션 추가
// Additional search options
$args->module_srl = $module_srl;
$args->s_title = $search_obj->s_title;
$args->s_content = $search_obj->s_content;
@ -513,16 +484,15 @@
$args->category_srl = $search_obj->category_srl;
$output = executeQuery('document.getDocumentCount', $args);
// 전체 갯수를 return
// Return total number of
$total_count = $output->data->count;
return (int)$total_count;
}
/**
* @brief 해당 document의 page 가져오기, module_srl이 없으면 전체에서..
* @brief Import page of the document, module_srl Without throughout ..
**/
function getDocumentPage($oDocument, $opt) {
// 정렬 형식에 따라서 query args 변경
// Sort type changes depending on the query args
switch($opt->sort_index) {
case 'update_order' :
if($opt->order_type == 'desc') $args->rev_update_order = $oDocument->get('update_order');
@ -552,7 +522,7 @@
$searchOpt->search_keyword = $opt->search_keyword;
$this->_setSearchOption($searchOpt, &$args, &$query_id, &$use_division);
// 전체 갯수를 구한후 해당 글의 페이지를 검색
// Guhanhu total number of the article search page
$output = executeQuery('document.getDocumentPage', $args);
$count = $output->data->count;
$page = (int)(($count-1)/$opt->list_count)+1;
@ -560,7 +530,7 @@
}
/**
* @brief 카테고리의 정보를 가져옴
* @brief Imported Category of information
**/
function getCategory($category_srl) {
$args->category_srl = $category_srl;
@ -581,7 +551,7 @@
}
/**
* @brief 특정 카테고리에 child가 있는지 체크
* @brief Check whether the child has a specific category
**/
function getCategoryChlidCount($category_srl) {
$args->category_srl = $category_srl;
@ -591,29 +561,27 @@
}
/**
* @brief 특정 모듈의 카테고리 목록을 가져옴
* 속도나 여러가지 상황을 고려해서 카테고리 목록은 php로 생성된 script를 include하여 사용하는 것을 원칙으로
* @brief Bringing the Categories list the specific module
* Speed and variety of categories, considering the situation created by the php script to include a list of the must, in principle, to use
**/
function getCategoryList($module_srl) {
// 대상 모듈의 카테고리 파일을 불러옴
// Category of the target module file swollen
$filename = sprintf("./files/cache/document_category/%s.php", $module_srl);
// 대상 파일이 없으면 카테고리 캐시 파일을 재생성
// If the target file to the cache file regeneration category
if(!file_exists($filename)) {
$oDocumentController = &getController('document');
if(!$oDocumentController->makeCategoryFile($module_srl)) return array();
}
@include($filename);
// 카테고리의 정리
// Cleanup of category
$document_category = array();
$this->_arrangeCategory($document_category, $menu->list, 0);
return $document_category;
}
/**
* @brief 카테고리를 1 배열 형식으로 변경하는 내부 method
* @brief Category within a primary method to change the array type
**/
function _arrangeCategory(&$document_category, $list, $depth) {
if(!count($list)) return;
@ -640,8 +608,7 @@
$obj->selected = $selected;
$list_order[$idx++] = $obj->category_srl;
// 부모 카테고리가 있으면 자식노드들의 데이터를 적용
// If you have a parent category of child nodes apply data
if($obj->parent_srl) {
$parent_srl = $obj->parent_srl;
@ -668,7 +635,7 @@
}
/**
* @brief 카테고리에 속한 문서의 갯수를 구함
* @brief Wanted number of documents belonging to category
**/
function getCategoryDocumentCount($module_srl, $category_srl) {
$args->module_srl = $module_srl;
@ -678,7 +645,7 @@
}
/**
* @brief 문서 category정보의 xml 캐시 파일을 return
* @brief Xml cache file of the document category return information
**/
function getCategoryXmlFile($module_srl) {
$xml_file = sprintf('files/cache/document_category/%s.xml.php',$module_srl);
@ -690,7 +657,7 @@
}
/**
* @brief 문서 category정보의 php 캐시 파일을 return
* @brief Php cache files in the document category return information
**/
function getCategoryPhpFile($module_srl) {
$php_file = sprintf('files/cache/document_category/%s.php',$module_srl);
@ -702,7 +669,7 @@
}
/**
* @brief 월별 보관현황을 가져옴
* @brief Imported post monthly archive status
**/
function getMonthlyArchivedList($obj) {
if($obj->mid) {
@ -710,8 +677,7 @@
$obj->module_srl = $oModuleModel->getModuleSrlByMid($obj->mid);
unset($obj->mid);
}
// 넘어온 module_srl은 array일 수도 있기에 array인지를 체크
// Module_srl passed the array may be a check whether the array
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
else $args->module_srl = $obj->module_srl;
@ -724,7 +690,7 @@
}
/**
* @brief 특정달의 일별 현황을 가져옴
* @brief Bringing a month on the status of the daily posts
**/
function getDailyArchivedList($obj) {
if($obj->mid) {
@ -732,8 +698,7 @@
$obj->module_srl = $oModuleModel->getModuleSrlByMid($obj->mid);
unset($obj->mid);
}
// 넘어온 module_srl은 array일 수도 있기에 array인지를 체크
// Module_srl passed the array may be a check whether the array
if(is_array($obj->module_srl)) $args->module_srl = implode(',', $obj->module_srl);
else $args->module_srl = $obj->module_srl;
$args->regdate = $obj->regdate;
@ -747,15 +712,14 @@
}
/**
* @brief 특정 모듈의 분류를 구함
* @brief Get a list for a particular module
**/
function getDocumentCategories() {
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
$module_srl = Context::get('module_srl');
$categories= $this->getCategoryList($module_srl);
$lang = Context::get('lang');
// 분류 없음 추가
// No additional category
$output = "0,0,{$lang->none_category}\n";
if($categories){
foreach($categories as $category_srl => $category) {
@ -766,7 +730,7 @@
}
/**
* @brief 문서 설정 정보를 구함
* @brief Wanted to set document information
**/
function getDocumentConfig() {
if(!$GLOBALS['__document_config__']) {
@ -779,21 +743,20 @@
}
/**
* @brief 공통 :: 모듈의 확장 변수 관리
* 모듈의 확장변수 관리는 모든 모듈에서 document module instance를 이용할때 사용할 있음
* @brief Common:: Module extensions of variable management
* Expansion parameter management module in the document module instance, when using all the modules available
**/
function getExtraVarsHTML($module_srl) {
// 기존의 extra_keys 가져옴
// Bringing existing extra_keys
$extra_keys = $this->getExtraKeys($module_srl);
Context::set('extra_keys', $extra_keys);
// grant 정보를 추출
// Get information of module_grants
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($this->module_path.'tpl', 'extra_keys');
}
/**
* @brief 공통 :: 모듈의 카테고리 변수 관리
* @brief Common:: Category parameter management module
**/
function getCategoryHTML($module_srl) {
$category_xml_file = $this->getCategoryXmlFile($module_srl);
@ -801,50 +764,43 @@
Context::set('category_xml_file', $category_xml_file);
Context::loadJavascriptPlugin('ui.tree');
// grant 정보를 추출
// Get information of module_grants
$oTemplate = &TemplateHandler::getInstance();
return $oTemplate->compile($this->module_path.'tpl', 'category_list');
}
/**
* @brief 특정 카테고리의 정보를 이용하여 템플릿을 구한후 return
* 관리자 페이지에서 특정 메뉴의 정보를 추가하기 위해 서버에서 tpl을 컴파일 한후 컴파일 html을 직접 return
* @brief Certain categories of information, return the template guhanhu
* Manager on the page to add information about a particular menu from the server after compiling tpl compiled a direct return html
**/
function getDocumentCategoryTplInfo() {
$oModuleModel = &getModel('module');
$oMemberModel = &getModel('member');
// 해당 메뉴의 정보를 가져오기 위한 변수 설정
// Get information on the menu for the parameter settings
$module_srl = Context::get('module_srl');
$module_info = $oModuleModel->getModuleInfoByModuleSrl($module_srl);
// 권한 체크
// Check permissions
$grant = $oModuleModel->getGrant($module_info, Context::get('logged_info'));
if(!$grant->manager) return new Object(-1,'msg_not_permitted');
$category_srl = Context::get('category_srl');
$parent_srl = Context::get('parent_srl');
// 회원 그룹의 목록을 가져옴
// Get a list of member groups
$group_list = $oMemberModel->getGroups($module_info->site_srl);
Context::set('group_list', $group_list);
// parent_srl이 있고 category_srl 이 없으면 하부 메뉴 추가임
// Without the sub-menu has parent_srl category_srl chugaim
if(!$category_srl && $parent_srl) {
// 상위 메뉴의 정보를 가져옴
// Get information of the parent menu
$parent_info = $this->getCategory($parent_srl);
// 추가하려는 메뉴의 기본 변수 설정
// Default parameter settings for a new menu
$category_info->category_srl = getNextSequence();
$category_info->parent_srl = $parent_srl;
$category_info->parent_category_title = $parent_info->title;
// root에 메뉴 추가하거나 기존 메뉴의 수정일 경우
// Add to the root menu, or if an existing menu Modified
} else {
// category_srl 이 있으면 해당 메뉴의 정보를 가져온다
// If category_srl the menu brings the information
if($category_srl) $category_info = $this->getCategory($category_srl);
// 찾아진 값이 없다면 신규 메뉴 추가로 보고 category_srl값만 구해줌
// If you do not add value d which pertain to the menu to see the new values guhaejum category_srl
if(!$category_info->category_srl) {
$category_info->category_srl = getNextSequence();
}
@ -853,17 +809,14 @@
$category_info->title = htmlspecialchars($category_info->title);
Context::set('category_info', $category_info);
// template 파일을 직접 컴파일한후 tpl변수에 담아서 return한다.
// tpl template file directly compile and will return a variable and puts it on.
$oTemplate = &TemplateHandler::getInstance();
$tpl = $oTemplate->compile('./modules/document/tpl', 'category_info');
$tpl = str_replace("\n",'',$tpl);
// 사용자 정의 언어 변경
// Changing user-defined language
$oModuleController = &getController('module');
$oModuleController->replaceDefinedLangCode($tpl);
// return 할 변수 설정
// set of variables to return
$this->add('tpl', $tpl);
}
@ -906,20 +859,17 @@
}
/**
* @brief module_srl값을 가지는 문서의 목록을 가져옴
* @brief module_srl value, bringing the list of documents
**/
function getTrashList($obj) {
// 변수 체크
// Variable check
$args->category_srl = $obj->category_srl?$obj->category_srl:null;
$args->sort_index = $obj->sort_index;
$args->order_type = $obj->order_type?$obj->order_type:'desc';
$args->page = $obj->page?$obj->page:1;
$args->list_count = $obj->list_count?$obj->list_count:20;
$args->page_count = $obj->page_count?$obj->page_count:10;
// 검색 옵션 정리
// Search options
$search_target = $obj->search_target;
$search_keyword = $obj->search_keyword;
if($search_target && $search_keyword) {

View file

@ -2,42 +2,37 @@
/**
* @class documentView
* @author NHN (developers@xpressengine.com)
* @brief document 모듈의 View class
* @brief View class of the module document
**/
class documentView extends document {
/**
* @brief 초기화
* @brief Initialization
**/
function init() {
}
/**
* @brief 문서 인쇄 기능
* 해당 글만 찾아서 그냥 출력해버린다;;
* @brief Document printing
* I make it out to find the geulman;;
**/
function dispDocumentPrint() {
// 목록 구현에 필요한 변수들을 가져온다
// Bring a list of variables needed to implement
$document_srl = Context::get('document_srl');
$oModuleModel = &getModel('module');
$module_info = $oModuleModel->getModuleInfoByDocumentSrl($document_srl);
// document 객체를 생성. 기본 데이터 구조의 경우 document모듈만 쓰면 만사 해결.. -_-;
// Create the document object. If the document module of basic data structures, write it all works .. -_-;
$oDocumentModel = &getModel('document');
// 선택된 문서 표시를 위한 객체 생성
// Creates an object for displaying the selected document
$oDocument = $oDocumentModel->getDocument($document_srl, $this->grant->manager);
if(!$oDocument->isExists()) return new Object(-1,'msg_invalid_request');
// 권한 체크
// Check permissions
if(!$oDocument->isAccessible()) return new Object(-1,'msg_not_permitted');
// 모듈 정보 세팅
// Information setting module
Context::set('module_info', $module_info);
// 브라우저 타이틀 설정
// Browser title settings
Context::setBrowserTitle($oDocument->getTitleText());
Context::set('oDocument', $oDocument);
@ -47,7 +42,7 @@
}
/**
* @brief 미리 보기
* @brief Preview
**/
function dispDocumentPreview() {
Context::set('layout','none');
@ -58,12 +53,11 @@
}
/**
* @brief 관리자가 선택한 문서에 대한 관리
* @brief Selected by the administrator for the document management
**/
function dispDocumentManageDocument() {
if(!Context::get('is_logged')) return new Object(-1,'msg_not_permitted');
// 선택한 목록을 세션에서 가져옴
// Taken from a list of selected sessions
$flag_list = $_SESSION['document_management'];
if(count($flag_list)) {
foreach($flag_list as $key => $val) {
@ -79,11 +73,9 @@
}
$oModuleModel = &getModel('module');
// 모듈 카테고리 목록과 모듈 목록의 조합
// The combination of module categories list and the list of modules
if(count($module_list)>1) Context::set('module_list', $module_categories);
// 팝업 레이아웃 선택
// Select Pop-up layout
$this->setLayoutPath('./common/tpl');
$this->setLayoutFile('popup_layout');
@ -96,7 +88,7 @@
$current_module_srls = Context::get('module_srls');
if(!$current_module_srl && !$current_module_srls) {
// 선택된 모듈의 정보를 가져옴
// Get information of the current module
$current_module_info = Context::get('current_module_info');
$current_module_srl = $current_module_info->module_srl;
if(!$current_module_srl) return new Object();