mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 11:44:10 +09:00
최근 게시물 위젯에서 document_srl 정렬을 다시 list_order로 변경하고 공지사항을 무조건 빠지도록 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2385 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
c3e85b349c
commit
eb77a802c6
2 changed files with 5 additions and 18 deletions
|
|
@ -20,7 +20,7 @@
|
|||
$order_target = $args->order_target;
|
||||
if(!in_array($order_target, array('list_order','update_order'))) $order_target = 'list_order';
|
||||
$order_type = $args->order_type;
|
||||
if(!in_array($order_type, array('asc','desc'))) $order_type = 'desc';
|
||||
if(!in_array($order_type, array('asc','desc'))) $order_type = 'asc';
|
||||
$list_count = (int)$args->list_count;
|
||||
if(!$list_count) $list_count = 5;
|
||||
$mid_list = explode(",",$args->mid_list);
|
||||
|
|
@ -33,24 +33,12 @@
|
|||
$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';
|
||||
$obj->sort_document_index = '1';
|
||||
} else {
|
||||
$order_target = 'update_order';
|
||||
$obj->sort_update_index = '-1';
|
||||
}
|
||||
|
||||
// DocumentModel::getDocumentList()를 이용하기 위한 변수 정리
|
||||
$obj->module_srl = implode(',',$module_srl);
|
||||
$obj->sort_index = $order_target;
|
||||
$obj->order_type = $order_type;
|
||||
$obj->order_type = $order_type=="desc"?"asc":"desc";
|
||||
$obj->list_count = $list_count;
|
||||
if($obj->sort_index == 'list_order') $obj->avoid_notice = -2100000000;
|
||||
|
||||
$output = executeQuery('widgets.newest_document.getNewestDocuments', $obj);
|
||||
|
||||
|
|
|
|||
|
|
@ -8,11 +8,10 @@
|
|||
<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" />
|
||||
<condition operation="excess" column="list_order" var="avoid_notice" pipe="and" />
|
||||
</conditions>
|
||||
<navigation>
|
||||
<index var="sort_index" default="document_srl" order="order_type" />
|
||||
<index var="sort_index" default="list_order" order="order_type" />
|
||||
<list_count var="list_count" default="20" />
|
||||
</navigation>
|
||||
</query>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue