mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-25 14:19:58 +09:00
#416 댓글 처리시 배열이 아닌 값에 대해 배열 처리를 하여 php오류가 생기는 문제 해결
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@3714 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
f0ca1a7e04
commit
c3cb138ff7
1 changed files with 10 additions and 6 deletions
|
|
@ -50,14 +50,14 @@
|
|||
$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($output->data && is_array($output->data)) $last_comment = array_pop($output->data);
|
||||
|
||||
// 최근 등록된 글의 정보
|
||||
$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);
|
||||
if($output->data && is_array($output->data)) $last_document = array_pop($output->data);
|
||||
|
||||
$last_item = null;
|
||||
if($last_comment && $last_document) {
|
||||
|
|
@ -78,8 +78,10 @@
|
|||
$total_documents_args->module_srls = implode(',',$module_srls);
|
||||
|
||||
$total_documents_output = executeQueryArray('widgets.forum.getTotalDocuments',$total_documents_args);
|
||||
foreach($total_documents_output->data as $val) {
|
||||
$modules[$val->module_srl]->document_count = $val->count;
|
||||
if($total_documents_output->data) {
|
||||
foreach($total_documents_output->data as $val) {
|
||||
$modules[$val->module_srl]->document_count = $val->count;
|
||||
}
|
||||
}
|
||||
|
||||
// 각 모듈별 댓글 수를 구함
|
||||
|
|
@ -87,8 +89,10 @@
|
|||
$total_comments_args->module_srls = implode(',',$module_srls);
|
||||
|
||||
$total_comments_output = executeQueryArray('widgets.forum.getTotalComments',$total_comments_args);
|
||||
foreach($total_comments_output->data as $val) {
|
||||
$modules[$val->module_srl]->comment_count = $val->count;
|
||||
if($total_comments_output->data) {
|
||||
foreach($total_comments_output->data as $val) {
|
||||
$modules[$val->module_srl]->comment_count = $val->count;
|
||||
}
|
||||
}
|
||||
|
||||
$widget_info->title = $title;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue