mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
분류 선택시 하위 분류까지 모두 포함되도록 기능 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3570 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
893ea828e5
commit
e40d5fa921
2 changed files with 24 additions and 19 deletions
|
|
@ -145,6 +145,14 @@
|
|||
$args->start_date = $obj->start_date?$obj->start_date:null;
|
||||
$args->end_date = $obj->end_date?$obj->end_date:null;
|
||||
|
||||
// 카테고리가 선택되어 있으면 하부 카테고리까지 모두 조건에 추가
|
||||
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가 변경됨)
|
||||
$query_id = 'document.getDocumentList';
|
||||
|
||||
|
|
@ -410,29 +418,26 @@
|
|||
**/
|
||||
function getCategoryList($module_srl) {
|
||||
// 한 페이지에서 여러번 호출될 경우를 대비해서 static var로 보관 (php4때문에 다른 방법으로 구현)
|
||||
if(isset($this->category_list[$module_srl])) return $this->category_list[$module_srl];
|
||||
if(!isset($this->category_list[$module_srl])) {
|
||||
|
||||
// php 캐싱된 파일의 유무를 체크하여 처리
|
||||
$args->module_srl = $module_srl;
|
||||
$args->sort_index = 'list_order';
|
||||
$output = executeQuery('document.getCategoryList', $args);
|
||||
// 대상 모듈의 카테고리 파일을 불러옴
|
||||
$filename = sprintf("./files/cache/document_category/%s.php", $module_srl);
|
||||
|
||||
// 대상 모듈의 카테고리 파일을 불러옴
|
||||
$filename = sprintf("./files/cache/document_category/%s.php", $module_srl);
|
||||
// 대상 파일이 없으면 카테고리 캐시 파일을 재생성
|
||||
if(!file_exists($filename)) {
|
||||
$oDocumentController = &getController('document');
|
||||
if(!$oDocumentController->makeCategoryFile($module_srl)) return array();
|
||||
}
|
||||
|
||||
// 대상 파일이 없으면 카테고리 캐시 파일을 재생성
|
||||
if(!file_exists($filename)) {
|
||||
$oDocumentController = &getController('document');
|
||||
if(!$oDocumentController->makeCategoryFile($module_srl)) return array();
|
||||
@include($filename);
|
||||
|
||||
// 카테고리의 정리
|
||||
$document_category = array();
|
||||
$this->_arrangeCategory($document_category, $menu->list, 0);
|
||||
$this->category_list[$module_srl] = $document_category;
|
||||
}
|
||||
|
||||
@include($filename);
|
||||
|
||||
// 카테고리의 정리
|
||||
$document_category = array();
|
||||
$this->_arrangeCategory($document_category, $menu->list, 0);
|
||||
|
||||
return $document_category;
|
||||
return $this->category_list[$module_srl];
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -7,7 +7,7 @@
|
|||
</columns>
|
||||
<conditions>
|
||||
<condition operation="in" column="module_srl" var="module_srl" filter="number" />
|
||||
<condition operation="equal" column="category_srl" var="category_srl" pipe="and" />
|
||||
<condition operation="in" column="category_srl" var="category_srl" pipe="and" />
|
||||
<condition operation="equal" column="is_notice" var="s_is_notice" pipe="and" />
|
||||
<group pipe="and">
|
||||
<condition operation="more" column="list_order" var="division" pipe="and" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue