Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

getNewestCommentList 메소드에서 document_srl지정 가능하도록 수정 #663

Merged
merged 3 commits into from
May 12, 2014

Conversation

mAKEkr
Copy link
Contributor

@mAKEkr mAKEkr commented Apr 22, 2014

getNewestCommentList를 통하여 게시판 스킨을 작성할때 해당 부분이 구현되지 않아 수정해보았습니다.

@smaker
Copy link
Contributor

smaker commented Apr 25, 2014

documentItem 객체에 getComments() 함수가 있는데 게시판 스킨에서 직접 commentModel::getNewestCommentList()을 호출할 필요가 있을까요?

@mAKEkr
Copy link
Contributor Author

mAKEkr commented Apr 25, 2014

@smaker getNewestCommentList를 이용하면 원하는만큼의 코멘트만 쿼리로 불러올 수 있고, getComments를 이용하여 Array를 reverse하여 새로운 댓글목록을 가져온다고 해도, 50개까지 불러오지 못합니다.(코멘트 페이지를 설정해서 가져와도, 항상 50개단위로 끊어서 가져오기때문에 불필요하게 가져오는 값들이 많아집니다.) 그렇기에 getNewestCommentList를 이용한것이에요 ^^;

@akasima
Copy link
Member

akasima commented May 7, 2014

@mAKEkr 이렇게 작성 되었을 때 document_srl 이 없이 검색할 때 문제가 없나요?

@mAKEkr
Copy link
Contributor Author

mAKEkr commented May 7, 2014

@akasima 확인해보니 document_srl이 미지정일경우 불러오지 못해서 쿼리를 수정했습니다 ㅠㅠ

@@ -385,6 +385,7 @@ function getNewestCommentList($obj, $columnList = array())
$args->module_srl = $obj->module_srl;
}

$args->document_srl = $obj->document_srl;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mAKEkr 기존 코드가 document_srl 이 정의 되어 있지 않았던것 같은데요.
model 에서 $args->docment_srl 을 설정되고 있고
document_srl 이 빈 값으로 전달 될 경우 오류가 없는지 확인 되어야 합니다.

테스트는 해보지 않았지만 document_srl이 null로 넘어 갈 경우 오류가 발생할 수 있어 보입니다.

@akasima akasima added this to the 1.7.5 milestone May 12, 2014
@akasima akasima self-assigned this May 12, 2014
akasima added a commit that referenced this pull request May 12, 2014
getNewestCommentList 메소드에서 document_srl지정 가능하도록 수정
@akasima akasima merged commit 942ff89 into xpressengine:develop May 12, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants