mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-22 04:39:55 +09:00
17117631 관리페이지 첨부파일 목록에서 대상을 표시하지 못하는 문제 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4453 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
81f676dc2c
commit
63c57c4a6d
1 changed files with 17 additions and 29 deletions
|
|
@ -60,48 +60,36 @@
|
|||
$document_srl_list = array();
|
||||
|
||||
foreach($output->data as $val) {
|
||||
$comment_srl = $val->upload_target_srl;
|
||||
if(!in_array($comment_srl, $document_srl_list)) $document_srl_list[] = $comment_srl;
|
||||
if(!in_array($val->upload_target_srl, $document_srl_list)) $document_srl_list[] = $val->upload_target_srl;
|
||||
}
|
||||
|
||||
// comment를 먼저 구해서 document_srl을 구함
|
||||
if(count($document_srl_list)) {
|
||||
$args->comment_srls = implode(',', $document_srl_list);
|
||||
$comment_output = executeQuery('comment.getComments', $args);
|
||||
if($comment_output->data && !is_array($comment_output->data)) {
|
||||
$comment_output->data = array($comment_output->data);
|
||||
}
|
||||
// comment의 첨부파일이면 document_srl을 추가로 구함
|
||||
if($document_srl_list) {
|
||||
$oCommentModel = &getModel('comment');
|
||||
$comment_output = $oCommentModel->getComments($document_srl_list);
|
||||
|
||||
if($comment_output->data) {
|
||||
for($i = 0; $i < count($comment_output->data); $i++) {
|
||||
$comment_info = $comment_output->data[$i];
|
||||
$comment_list[$comment_info->comment_srl] = $comment_info;
|
||||
if($comment_output) {
|
||||
foreach($comment_output as $val) {
|
||||
$comment_list[$val->comment_srl] = $val->document_srl;
|
||||
}
|
||||
|
||||
foreach($output->data as $val) {
|
||||
$val->target_document_srl = $comment_list[$val->upload_target_srl]->document_srl;
|
||||
for($i=1; $i <= count($output->data); $i++) {
|
||||
$output->data[$i]->target_document_srl = $comment_list[$output->data[$i]->upload_target_srl];
|
||||
}
|
||||
|
||||
foreach($comment_output->data as $val) {
|
||||
$document_srl = $val->document_srl;
|
||||
if(!in_array($document_srl, $document_srl_list)) $document_srl_list[] = $document_srl;
|
||||
foreach($comment_output as $val) {
|
||||
if(!in_array($val->document_srl, $document_srl_list)) $document_srl_list[] = $val->document_srl;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// document를 구함
|
||||
if(count($document_srl_list)) {
|
||||
$args->document_srls = implode(',', $document_srl_list);
|
||||
$document_output = executeQuery('document.getDocuments', $args);
|
||||
if($document_output->data && !is_array($document_output->data)) {
|
||||
$document_output->data = array($document_output->data);
|
||||
}
|
||||
$document_output = executeQueryArray('document.getDocuments', $args);
|
||||
|
||||
for($i = 0; $i < count($document_output->data); $i++) {
|
||||
$document_info = $document_output->data[$i];
|
||||
$document_list[$document_info->document_srl] = $document_info;
|
||||
foreach($document_output->data as $document) {
|
||||
$document_list[$document->document_srl] = $document;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Context::set('total_count', $output->total_count);
|
||||
|
|
@ -131,4 +119,4 @@
|
|||
}
|
||||
|
||||
}
|
||||
?>
|
||||
?>
|
||||
Loading…
Add table
Add a link
Reference in a new issue