From 20ba44fafe7a42ea789b3a0ac5274c1e8e3e15f7 Mon Sep 17 00:00:00 2001 From: zero Date: Thu, 15 Feb 2007 14:40:54 +0000 Subject: [PATCH] git-svn-id: http://xe-core.googlecode.com/svn/trunk@105 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- classes/xml/XmlJsFilter.class.php | 2 +- classes/xml/XmlQueryParser.class.php | 2 +- modules/board/board.view.php | 211 +++++++++++++------------ modules/board/conf/action.xml | 23 ++- modules/install/install.controller.php | 2 +- modules/member/member.controller.php | 5 +- 6 files changed, 131 insertions(+), 114 deletions(-) diff --git a/classes/xml/XmlJsFilter.class.php b/classes/xml/XmlJsFilter.class.php index 980fa4273..ed064fa5d 100644 --- a/classes/xml/XmlJsFilter.class.php +++ b/classes/xml/XmlJsFilter.class.php @@ -73,7 +73,7 @@ $buff = FileHandler::readFile($this->xml_file); // xml parsing - $xml_obj = $this->parse($buff); + $xml_obj = parent::parse($buff); // XmlJsFilter는 filter_name, field, parameter 3개의 데이터를 핸들링 $filter_name = $xml_obj->filter->attrs->name; diff --git a/classes/xml/XmlQueryParser.class.php b/classes/xml/XmlQueryParser.class.php index 0c90ae2ba..d736014e6 100644 --- a/classes/xml/XmlQueryParser.class.php +++ b/classes/xml/XmlQueryParser.class.php @@ -30,7 +30,7 @@ function parse($query_id, $xml_file, $cache_file) { // query xml 파일을 찾아서 파싱, 결과가 없으면 return $buff = FileHandler::readFile($xml_file); - $xml_obj = $this->parse($buff); + $xml_obj = parent::parse($buff); if(!$xml_obj) return; // 쿼리 스크립트를 만들때 필요한 변수들 diff --git a/modules/board/board.view.php b/modules/board/board.view.php index b4ee48188..887fe8a20 100644 --- a/modules/board/board.view.php +++ b/modules/board/board.view.php @@ -30,8 +30,8 @@ function init() { // 카테고리를 사용한다면 카테고리 목록을 구해옴 if($this->module_info->use_category=='Y') { - $oDocument = getModule('document'); - $this->category_list = $oDocument->getCategoryList($this->module_srl); + $oDocumentModel = getModel('document'); + $this->category_list = $oDocumentModel->getCategoryList($this->module_srl); Context::set('category_list', $this->category_list); } @@ -43,22 +43,6 @@ return true; } - - /** - * @brief 로그인 폼 출력 - **/ - function dispLogin() { - if(Context::get('is_logged')) return $this->dispContent(); - $this->setTemplateFile('login_form'); - } - - /** - * @brief 로그아웃 화면 출력 - **/ - function dispLogout() { - if(!Context::get('is_logged')) return $this->dispContent(); - $this->setTemplateFile('logout'); - } /** * @brief 목록 및 선택된 글 출력 @@ -152,7 +136,8 @@ if($category) $search_obj->category_srl = $category; // 목록의 경우 document->getDocumentList 에서 걍 알아서 다 해버리는 구조이다... (아.. 이거 나쁜 버릇인데.. ㅡ.ㅜ 어쩔수 없다) - $output = $oDocument->getDocumentList($this->module_srl, 'list_order', $page, $this->list_count, $this->page_count, $search_obj); + $oDocumentModel = getModel('document'); + $output = $oDocumentModel->getDocumentList($this->module_srl, 'list_order', $page, $this->list_count, $this->page_count, $search_obj); // 템플릿에 쓰기 위해서 context::set Context::set('total_count', $output->total_count); @@ -167,14 +152,13 @@ $search_option[$this->search_option[$i]] = Context::getLang($this->search_option[$i]); } Context::set('search_option', $search_option); - $this->setTemplateFile('list'); } - + /** * @brief 글 작성 화면 출력 **/ - function dispWriteForm() { + function dispWrite() { // 권한 체크 if(!$this->grant->write_document) return $this->dispMessage('msg_not_permitted'); @@ -210,7 +194,7 @@ /** * @brief 문서 삭제 화면 출력 **/ - function dispDeleteForm() { + function dispDelete() { // 권한 체크 if(!$this->grant->write_document) return $this->dispMessage('msg_not_permitted'); @@ -224,7 +208,7 @@ } // 삭제하려는 글이 없으면 에러 - if(!$document) return $this->dispContent(); + if(!$document) return $this->list(); // 권한이 없는 경우 비밀번호 입력화면으로 if($document&&!$document->is_granted) return $this->setTemplateFile('input_password_form'); @@ -237,7 +221,7 @@ /** * @brief 댓글의 답글 화면 출력 **/ - function dispCommentReplyForm() { + function dispCommentReply() { // 권한 체크 if(!$this->grant->write_comment) return $this->dispMessage('msg_not_permitted'); @@ -267,7 +251,7 @@ /** * @brief 댓글 수정 폼 출력 **/ - function dispCommentModifyForm() { + function dispCommentModify() { // 권한 체크 if(!$this->grant->write_comment) return $this->dispMessage('msg_not_permitted'); @@ -299,7 +283,7 @@ /** * @brief 댓글 삭제 화면 출력 **/ - function dispCommentDeleteForm() { + function dispCommentDelete() { // 권한 체크 if(!$this->grant->write_comment) return $this->dispMessage('msg_not_permitted'); @@ -313,7 +297,7 @@ } // 삭제하려는 글이 없으면 에러 - if(!$comment) return $this->dispContent(); + if(!$comment) return $this->list(); // 권한이 없는 경우 비밀번호 입력화면으로 if($comment_srl&&$comment&&!$_SESSION['own_comment'][$comment_srl]) return $this->setTemplateFile('input_password_form'); @@ -323,6 +307,23 @@ $this->setTemplateFile('delete_comment_form'); } + /** + * @brief 로그인 폼 출력 + **/ + function dispLogin() { + if(Context::get('is_logged')) return $this->list(); + $this->setTemplateFile('login_form'); + } + + /** + * @brief 로그아웃 화면 출력 + **/ + function dispLogout() { + if(!Context::get('is_logged')) return $this->list(); + $this->setTemplateFile('logout'); + } + + /** * @brief 메세지 출력 **/ @@ -333,6 +334,26 @@ $this->setTemplateFile('message'); } + /** + * @brief 엮인글 삭제 화면 출력 + **/ + function dispTrackbackDelete() { + // 삭제할 댓글번호를 가져온다 + $trackback_srl = Context::get('trackback_srl'); + + // 삭제하려는 댓글가 있는지 확인 + $oTrackback = getModule('trackback'); + $output = $oTrackback->getTrackback($trackback_srl); + $trackback = $output->data; + + // 삭제하려는 글이 없으면 에러 + if(!$trackback) return $this->list(); + + Context::set('trackback',$trackback); + + $this->setTemplateFile('delete_trackback_form'); + } + /** * @brief RSS 출력 **/ @@ -360,78 +381,6 @@ exit(); } - /** - * @brief 엮인글 삭제 화면 출력 - **/ - function dispTrackbackDeleteForm() { - // 삭제할 댓글번호를 가져온다 - $trackback_srl = Context::get('trackback_srl'); - - // 삭제하려는 댓글가 있는지 확인 - $oTrackback = getModule('trackback'); - $output = $oTrackback->getTrackback($trackback_srl); - $trackback = $output->data; - - // 삭제하려는 글이 없으면 에러 - if(!$trackback) return $this->dispContent(); - - Context::set('trackback',$trackback); - - $this->setTemplateFile('delete_trackback_form'); - } - - /** - * @brief 게시판 추가 폼 출력 - **/ - function dispBoardInsert() { - // 템플릿 파일 지정 - $this->setTemplateFile('insert_form'); - } - - /** - * @brief 게시판 삭제 화면 출력 - **/ - function dispBoardDeleteForm() { - if(!Context::get('module_srl')) return $this->dispContent(); - - $module_info = Context::get('module_info'); - - $oDocument = getModule('document'); - $document_count = $oDocument->getDocumentCount($module_info->module_srl); - $module_info->document_count = $document_count; - - Context::set('module_info',$module_info); - - // 템플릿 파일 지정 - $this->setTemplateFile('delete_form'); - } - - /** - * @brief 스킨 정보 보여줌 - **/ - function dispSkinInfo() { - // 현재 선택된 모듈의 스킨의 정보 xml 파일을 읽음 - $module_info = Context::get('module_info'); - $skin = $module_info->skin; - - $oModule = getModule('module_manager'); - $skin_info = $oModule->loadSkinInfo($this->module_path, $skin); - - // skin_info에 extra_vars 값을 지정 - if(count($skin_info->extra_vars)) { - foreach($skin_info->extra_vars as $key => $val) { - $name = $val->name; - $type = $val->type; - $value = $module_info->{$name}; - if($type=="checkbox"&&!$value) $value = array(); - $skin_info->extra_vars[$key]->value= $value; - } - } - - Context::set('skin_info', $skin_info); - $this->setTemplateFile('skin_info'); - } - /** * @brief 게시판 관리 목록 보여줌 **/ @@ -443,7 +392,7 @@ $module_info = $oModule->getModuleInfoByModuleSrl($module_srl); if(!$module_info) { Context::set('module_srl',''); - $this->act = 'dispContent'; + $this->act = 'list'; } else Context::set('module_info',$module_info); } @@ -469,17 +418,69 @@ /** * @brief 게시판의 정보 출력 **/ - function dispBoardInfo() { - if(!Context::get('module_srl')) return $this->dispContent(); + function dispAdminBoardInfo() { + if(!Context::get('module_srl')) return $this->list(); // 템플릿 파일 지정 $this->setTemplateFile('info'); } + /** + * @brief 게시판 추가 폼 출력 + **/ + function dispAdminInsertBoard() { + // 템플릿 파일 지정 + $this->setTemplateFile('insert_form'); + } + + /** + * @brief 게시판 삭제 화면 출력 + **/ + function dispAdminDeleteBoard() { + if(!Context::get('module_srl')) return $this->list(); + + $module_info = Context::get('module_info'); + + $oDocument = getModule('document'); + $document_count = $oDocument->getDocumentCount($module_info->module_srl); + $module_info->document_count = $document_count; + + Context::set('module_info',$module_info); + + // 템플릿 파일 지정 + $this->setTemplateFile('delete_form'); + } + + /** + * @brief 스킨 정보 보여줌 + **/ + function dispAdminSkinInfo() { + // 현재 선택된 모듈의 스킨의 정보 xml 파일을 읽음 + $module_info = Context::get('module_info'); + $skin = $module_info->skin; + + $oModule = getModule('module_manager'); + $skin_info = $oModule->loadSkinInfo($this->module_path, $skin); + + // skin_info에 extra_vars 값을 지정 + if(count($skin_info->extra_vars)) { + foreach($skin_info->extra_vars as $key => $val) { + $name = $val->name; + $type = $val->type; + $value = $module_info->{$name}; + if($type=="checkbox"&&!$value) $value = array(); + $skin_info->extra_vars[$key]->value= $value; + } + } + + Context::set('skin_info', $skin_info); + $this->setTemplateFile('skin_info'); + } + /** * @brief 카테고리의 정보 출력 **/ - function dispCategoryInfo() { + function dispAdminCategoryInfo() { $module_srl = Context::get('module_srl'); // 카테고리의 목록을 구해옴 @@ -502,7 +503,7 @@ /** * @brief 권한 목록 출력 **/ - function dispGrantInfo() { + function dispAdminGrantInfo() { $module_srl = Context::get('module_srl'); // 현 모듈의 권한 목록을 가져옴 diff --git a/modules/board/conf/action.xml b/modules/board/conf/action.xml index 3b092c488..8f4737571 100644 --- a/modules/board/conf/action.xml +++ b/modules/board/conf/action.xml @@ -1,6 +1,21 @@ - - - - + + + + + + + + + + + + + + + + + + + diff --git a/modules/install/install.controller.php b/modules/install/install.controller.php index ec35605e8..1b7c511d2 100644 --- a/modules/install/install.controller.php +++ b/modules/install/install.controller.php @@ -84,7 +84,7 @@ // 그룹을 입력 $group_args->title = Context::getLang('default_group_1'); $group_args->is_default = 'Y'; - $oMemberController->insertGroup($group_args); + $output = $oMemberController->insertGroup($group_args); $group_args->title = Context::getLang('default_group_2'); $group_args->is_default = 'N'; diff --git a/modules/member/member.controller.php b/modules/member/member.controller.php index 36736b27e..ae712dc19 100644 --- a/modules/member/member.controller.php +++ b/modules/member/member.controller.php @@ -233,8 +233,9 @@ $oDB = &DB::getInstance(); // is_default값을 체크, Y일 경우 일단 모든 is_default에 대해서 N 처리 - if($args->is_default!='Y') $args->is_default = 'N'; - else { + if($args->is_default!='Y') { + $args->is_default = 'N'; + } else { $output = $oDB->executeQuery('member.updateGroupDefaultClear'); if(!$output->toBool()) return $output; }