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,37 +2,34 @@
/**
* @class fileAdminController
* @author NHN (developers@xpressengine.com)
* @brief file 모듈의 admin controller 클래스
* @brief admin controller class of the file module
**/
class fileAdminController extends file {
/**
* @brief 초기화
* @brief Initialization
**/
function init() {
}
/**
* @brief 특정 모듈의 첨부파일 모두 삭제
* @brief Delete the attachment of a particular module
**/
function deleteModuleFiles($module_srl) {
// 전체 첨부파일 목록을 구함
// Get a full list of attachments
$args->module_srl = $module_srl;
$output = executeQueryArray('file.getModuleFiles',$args);
if(!$output) return $output;
$files = $output->data;
// DB에서 삭제
// Remove from the DB
$args->module_srl = $module_srl;
$output = executeQuery('file.deleteModuleFiles', $args);
if(!$output->toBool()) return $output;
// 실제 파일 삭제 (일단 약속에 따라서 한번에 삭제)
// Remove the file
FileHandler::removeDir( sprintf("./files/attach/images/%s/", $module_srl) ) ;
FileHandler::removeDir( sprintf("./files/attach/binaries/%s/", $module_srl) );
// DB에서 구한 파일 목록을 삭제
// Remove the file list obtained from the DB
$path = array();
$cnt = count($files);
for($i=0;$i<$cnt;$i++) {
@ -42,18 +39,17 @@
$path_info = pathinfo($uploaded_filename);
if(!in_array($path_info['dirname'], $path)) $path[] = $path_info['dirname'];
}
// 해당 글의 첨부파일 디렉토리 삭제
// Remove a file directory of the document
for($i=0;$i<count($path);$i++) FileHandler::removeBlankDir($path[$i]);
return $output;
}
/**
* @brief 관리자 페이지에서 선택된 파일들을 삭제
* @brief Delete selected files from the administrator page
**/
function procFileAdminDeleteChecked() {
// 선택된 글이 없으면 오류 표시
// An error appears if no document is selected
$cart = Context::get('cart');
if(!$cart) return $this->stop('msg_cart_is_null');
$file_srl_list= explode('|@|', $cart);
@ -61,8 +57,7 @@
if(!$file_count) return $this->stop('msg_cart_is_null');
$oFileController = &getController('file');
// 글삭제
// Delete the post
for($i=0;$i<$file_count;$i++) {
$file_srl = trim($file_srl_list[$i]);
if(!$file_srl) continue;
@ -74,31 +69,29 @@
}
/**
* @brief 파일 기본 정보의 추가
* @brief Add file information
**/
function procFileAdminInsertConfig() {
// 설정 정보를 받아옴 (module model 객체를 이용)
// Get configurations (using module model object)
$config->allowed_filesize = Context::get('allowed_filesize');
$config->allowed_attach_size = Context::get('allowed_attach_size');
$config->allowed_filetypes = Context::get('allowed_filetypes');
$config->allow_outlink = Context::get('allow_outlink');
$config->allow_outlink_format = Context::get('allow_outlink_format');
$config->allow_outlink_site = Context::get('allow_outlink_site');
// module Controller 객체 생성하여 입력
// Create module Controller object
$oModuleController = &getController('module');
$output = $oModuleController->insertModuleConfig('file',$config);
return $output;
}
/**
* @brief 모듈별 파일 기본 정보의 추가
* @brief Add file information for each module
**/
function procFileAdminInsertModuleConfig() {
// 필요한 변수를 받아옴
// Get variables
$module_srl = Context::get('target_module_srl');
// 여러개의 모듈 일괄 설정일 경우
// In order to configure multiple modules at once
if(preg_match('/^([0-9,]+)$/',$module_srl)) $module_srl = explode(',',$module_srl);
else $module_srl = array($module_srl);