mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
최근게시물 추출시 순서에 따른 인덱스를 활용하도록 쿼리 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2383 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
d2a13b36c9
commit
0c2dd97644
2 changed files with 14 additions and 6 deletions
|
|
@ -27,17 +27,23 @@
|
|||
$subject_cut_size = $args->subject_cut_size;
|
||||
if(!$subject_cut_size) $subject_cut_size = 0;
|
||||
|
||||
// module_srl 대신 mid가 넘어왔을 경우는 직접 module_srl을 구해줌
|
||||
if($mid_list) {
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_srl = $oModuleModel->getModuleSrlByMid($mid_list);
|
||||
}
|
||||
|
||||
/**
|
||||
* order_target=list_order일 경우 document 테이블의 list_order 컬럼말고 document_srl을 이용하게 하고 순서를 반대로 한다
|
||||
* 이유는 공지사항을 적용하지 않은 순수한 글 작성 순서로만 사용하기 위해성.ㅁ
|
||||
* 2007. 8. 22. zero
|
||||
**/
|
||||
if($order_target == 'list_order') $order_target = 'document_srl';
|
||||
|
||||
// module_srl 대신 mid가 넘어왔을 경우는 직접 module_srl을 구해줌
|
||||
if($mid_list) {
|
||||
$oModuleModel = &getModel('module');
|
||||
$module_srl = $oModuleModel->getModuleSrlByMid($mid_list);
|
||||
if($order_target == 'list_order') {
|
||||
$order_target = 'document_srl';
|
||||
$obj->sort_document_index = '1';
|
||||
} else {
|
||||
$order_target = 'update_order';
|
||||
$obj->sort_update_index = '-1';
|
||||
}
|
||||
|
||||
// DocumentModel::getDocumentList()를 이용하기 위한 변수 정리
|
||||
|
|
|
|||
|
|
@ -8,6 +8,8 @@
|
|||
<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="more" column="document_srl" var="sort_document_index" pipe="and" />
|
||||
<condition operation="less" column="update_order" var="sort_update_index" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="document_srl" order="order_type" />
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue