mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-22 05:15:29 +09:00
Vote queries have been modified differently depending on the target
This commit is contained in:
parent
40b7feedfc
commit
e0aad1839a
2 changed files with 36 additions and 28 deletions
|
|
@ -1216,18 +1216,28 @@ class boardView extends board
|
||||||
{
|
{
|
||||||
return new Object(-1, 'msg_not_permitted');
|
return new Object(-1, 'msg_not_permitted');
|
||||||
}
|
}
|
||||||
|
|
||||||
$target = Context::get('target');
|
|
||||||
|
|
||||||
if($target === 'document')
|
|
||||||
{
|
|
||||||
$document_srl = Context::get('document_srl');
|
|
||||||
$oMemberModel = getModel('member');
|
$oMemberModel = getModel('member');
|
||||||
|
|
||||||
$args = new stdClass();
|
$target = Context::get('target');
|
||||||
$args->document_srl = $document_srl;
|
$target_srl = Context::get('target_srl');
|
||||||
|
|
||||||
$output = executeQueryArray('document.getDocumentVotedLog', $args);
|
$args = new stdClass();
|
||||||
|
if($target === 'document')
|
||||||
|
{
|
||||||
|
$queryId = 'document.getDocumentVotedLog';
|
||||||
|
$args->document_srl = $target_srl;
|
||||||
|
}
|
||||||
|
elseif($target === 'comment')
|
||||||
|
{
|
||||||
|
$queryId = 'comment.getCommentVotedLog';
|
||||||
|
$args->comment_srl = $target_srl;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return new Object(-1, 'Target name error');
|
||||||
|
}
|
||||||
|
|
||||||
|
$output = executeQueryArray($queryId, $args);
|
||||||
if(!$output->toBool())
|
if(!$output->toBool())
|
||||||
{
|
{
|
||||||
return $output;
|
return $output;
|
||||||
|
|
@ -1257,8 +1267,6 @@ class boardView extends board
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
Context::set('vote_member_info', $vote_member_infos);
|
Context::set('vote_member_info', $vote_member_infos);
|
||||||
Context::set('blame_member_info', $blame_member_infos);
|
Context::set('blame_member_info', $blame_member_infos);
|
||||||
$this->setTemplateFile('vote_log');
|
$this->setTemplateFile('vote_log');
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@
|
||||||
<div cond="$oDocument->getSignature()" class="tx">{$oDocument->getSignature()}</div>
|
<div cond="$oDocument->getSignature()" class="tx">{$oDocument->getSignature()}</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnArea">
|
<div class="btnArea">
|
||||||
<a class="btn" href="{getUrl('act','dispBoardVoteLog','document_srl',$oDocument->document_srl,'target','document')}"><i class="xi-list-ul"></i>추천인 목록</a>
|
<a class="btn" href="{getUrl('act','dispBoardVoteLog','target_srl',$oDocument->document_srl,'target','document')}"><i class="xi-list-ul"></i>추천인 목록</a>
|
||||||
<a cond="$update_view" class="btn" href="{getUrl('act','dispBoardUpdateLog','document_srl',$oDocument->document_srl,'comment_srl','')}"><i class="xi-list-ul"></i>{$lang->update_log}</a>
|
<a cond="$update_view" class="btn" href="{getUrl('act','dispBoardUpdateLog','document_srl',$oDocument->document_srl,'comment_srl','')}"><i class="xi-list-ul"></i>{$lang->update_log}</a>
|
||||||
<a cond="$oDocument->isEditable()" class="btn" href="{getUrl('act','dispBoardWrite','document_srl',$oDocument->document_srl,'comment_srl','')}"><i class="xi-eraser"></i>{$lang->cmd_modify}</a>
|
<a cond="$oDocument->isEditable()" class="btn" href="{getUrl('act','dispBoardWrite','document_srl',$oDocument->document_srl,'comment_srl','')}"><i class="xi-eraser"></i>{$lang->cmd_modify}</a>
|
||||||
<a cond="$oDocument->isEditable()" class="btn" href="{getUrl('act','dispBoardDelete','document_srl',$oDocument->document_srl,'comment_srl','')}"><i class="xi-trash"></i>{$lang->cmd_delete}</a>
|
<a cond="$oDocument->isEditable()" class="btn" href="{getUrl('act','dispBoardDelete','document_srl',$oDocument->document_srl,'comment_srl','')}"><i class="xi-trash"></i>{$lang->cmd_delete}</a>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue