mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-28 07:39:55 +09:00
포럼 위젯에 최근글-최근댓글의 처리를 추가
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3578 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
554ccd6d71
commit
8578efa48f
5 changed files with 42 additions and 9 deletions
|
|
@ -45,13 +45,32 @@
|
|||
$modules[$module->module_srl]->document_count = 0;
|
||||
$modules[$module->module_srl]->comment_count = 0;
|
||||
|
||||
// 최근 수정된 댓글의 정보
|
||||
// 최근 등록된 댓글의 정보
|
||||
$last_comment = null;
|
||||
$last_args = null;
|
||||
$last_args->module_srl = $module->module_srl;
|
||||
$output = executeQuery('widgets.forum.getLatestComments', $last_args);
|
||||
if(is_array($output->data)) $last_comment = array_pop($output->data);
|
||||
|
||||
if(is_array($output->data)) $modules[$module->module_srl]->last_comment = array_pop($output->data);
|
||||
else $modules[$module->module_srl]->last_comment = null;
|
||||
// 최근 등록된 글의 정보
|
||||
$last_document = null;
|
||||
$last_args = null;
|
||||
$last_args->module_srl = $module->module_srl;
|
||||
$output = executeQuery('widgets.forum.getLatestDocuments', $last_args);
|
||||
if(is_array($output->data)) $last_document = array_pop($output->data);
|
||||
|
||||
$last_item = null;
|
||||
if($last_comment && $last_document) {
|
||||
if($last_document->regdate > $last_comment->regdate) $last_item = $last_document;
|
||||
else $last_item = $last_comment;
|
||||
} elseif($last_document) {
|
||||
$last_item = $last_document;
|
||||
} elseif($last_comment) {
|
||||
$last_item = $last_comment;
|
||||
}
|
||||
$modules[$module->module_srl]->last_item = $last_item;
|
||||
|
||||
if($last_item && $last_item->regdate > date("YmdHis",time()-$duration_new*60*60)) $modules[$module->module_srl]->is_new = true;
|
||||
}
|
||||
|
||||
// 각 모듈별 전체글을 구함
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue