댓글 목록을 구하는 method의 결과값을 commentItem 객체로 return 하도록 수정

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@6384 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
zero 2009-05-25 01:53:03 +00:00
parent 90a37a23d7
commit dc2a8c76a5
2 changed files with 7 additions and 9 deletions

View file

@ -392,10 +392,16 @@
}
// comment.getTotalCommentList 쿼리 실행
$output = executeQuery($query_id, $args);
$output = executeQueryArray($query_id, $args);
// 결과가 없거나 오류 발생시 그냥 return
if(!$output->toBool()||!count($output->data)) return $output;
foreach($output->data as $key => $val) {
unset($_oComment);
$_oComment = new CommentItem(0);
$_oComment->setAttribute($val);
$output->data[$key] = $_oComment;
}
return $output;
}

View file

@ -49,14 +49,6 @@
$oCommentModel = &getModel('comment');
$output = $oCommentModel->getTotalCommentList($args);
if(!$output->toBool()|| !$output->data) return $output;
$list = array();
foreach($output->data as $key => $val) {
$oComment = new commentItem(0);
$oComment->setAttribute($val);
$list[$key] = $oComment;
}
$output->data = $list;
return $output;
}