r8112 기능추가

git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8113 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
ngleader 2011-02-21 04:41:51 +00:00
parent 9b8e32d45b
commit 741582c912
16 changed files with 40 additions and 4 deletions

View file

@ -619,11 +619,9 @@
$comment_config->use_vote_up = Context::get('use_vote_up');
if(!$comment_config->use_vote_up) $comment_config->use_vote_up = 'Y';
if($comment_config->use_vote_up!='Y') $comment_config->use_vote_up = 'N';
$comment_config->use_vote_down = Context::get('use_vote_down');
if(!$comment_config->use_vote_down) $comment_config->use_vote_down = 'Y';
if($comment_config->use_vote_down!='Y') $comment_config->use_vote_down = 'N';
for($i=0;$i<count($module_srl);$i++) {
$srl = trim($module_srl[$i]);

View file

@ -435,6 +435,19 @@
$point = Context::get('point');
if($point != -1) $point = 1;
$oCommentModel = &getModel('comment');
$oComment = $oCommentModel->getComment($comment_srl, false, false);
$module_srl = $oComment->get('module_srl');
if(!$module_srl) return new Object(-1, 'msg_invalid_request');
$oModuleModel = &getModel('module');
$comment_config = $oModuleModel->getModulePartConfig('comment',$module_srl);
if($point == -1){
if($comment_config->use_vote_down!='S') return new Object(-1, 'msg_invalid_request');
}else{
if($comment_config->use_vote_up!='S') return new Object(-1, 'msg_invalid_request');
}
$args->comment_srl = $comment_srl;
$args->point = $point;

View file

@ -18,6 +18,7 @@
<td>
<select name="use_vote_up" class="w100">
<option value="Y" <!--@if($comment_config->use_vote_up=='Y')-->selected="selected"<!--@end-->>{$lang->use}</option>
<option value="S" <!--@if($comment_config->use_vote_up=='S')-->selected="selected"<!--@end-->>{$lang->show_voted_member}</option>
<option value="N" <!--@if($comment_config->use_vote_up=='N')-->selected="selected"<!--@end-->>{$lang->notuse}</option>
</select>
</td>
@ -27,6 +28,7 @@
<td>
<select name="use_vote_down" class="w100">
<option value="Y" <!--@if($comment_config->use_vote_down=='Y')-->selected="selected"<!--@end-->>{$lang->use}</option>
<option value="S" <!--@if($comment_config->use_vote_down=='S')-->selected="selected"<!--@end-->>{$lang->show_voted_member}</option>
<option value="N" <!--@if($comment_config->use_vote_down=='N')-->selected="selected"<!--@end-->>{$lang->notuse}</option>
</select>
</td>