mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-08 19:21:40 +09:00
최근게시물의 쿼리문을 files, documents 테이블을 직접 join시켜서 존재하는 문서만을 가져오도록 코드 수정
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@2946 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7898bd4d33
commit
9eba8bde28
2 changed files with 15 additions and 24 deletions
|
|
@ -59,7 +59,6 @@
|
|||
if(count($mid_list)==1) $widget_info->module_name = $mid_list[0];
|
||||
|
||||
// 변수 정리
|
||||
$obj->sort_index = $order_target;
|
||||
$obj->list_count = $widget_info->rows_list_count * $widget_info->cols_list_count;
|
||||
|
||||
// mid에 해당하는 module_srl을 구함
|
||||
|
|
@ -73,29 +72,19 @@
|
|||
// 정해진 모듈에서 문서별 파일 목록을 구함
|
||||
$files_output = executeQuery("file.getOneFileInDocument", $obj);
|
||||
|
||||
// 결과에서 문서 번호만을 따로 추출
|
||||
if($files_output->data) {
|
||||
foreach($files_output->data as $key => $val) {
|
||||
$document_srl_list[] = $val->upload_target_srl;
|
||||
}
|
||||
}
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
if(count($document_srl_list)) {
|
||||
|
||||
$documents_output = $oDocumentModel->getDocuments($document_srl_list);
|
||||
if(!count($documents_output)) return;
|
||||
|
||||
foreach($documents_output as $key => $val) {
|
||||
$document_list[] = $val;
|
||||
if(count($files_output->data)) {
|
||||
foreach($files_output->data as $key => $val) {
|
||||
$oDocument = null;
|
||||
$oDocument = $oDocumentModel->getDocument();
|
||||
$oDocument->setAttribute($val);
|
||||
$document_list[] = $oDocument;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
$document_count = count($document_list);
|
||||
$total_count = $widget_info->rows_list_count * $widget_info->cols_list_count;
|
||||
for($i=$document_count;$i<$total_count;$i++) $document_list[] = new DocumentItem();
|
||||
|
||||
$widget_info->document_list = $document_list;
|
||||
|
||||
Context::set('widget_info', $widget_info);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue