mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
->getVoted 를 로컬변수로 만들어 불피요한 동작하지 않도록 개선
This commit is contained in:
parent
d477811a8b
commit
7b02e8c080
1 changed files with 5 additions and 4 deletions
|
|
@ -449,14 +449,15 @@ class documentModel extends document
|
|||
|
||||
$oModuleModel = getModel('module');
|
||||
$document_config = $oModuleModel->getModulePartConfig('document',$module_srl);
|
||||
$oDocumentisVoted = $oDocument->getVoted();
|
||||
if($document_config->use_vote_up!='N' && $member_srl!=$this->user->member_srl)
|
||||
{
|
||||
if($oDocument->getVoted() === false || $oDocument->getVoted() < 0)
|
||||
if($oDocumentisVoted === false || $oDocumentisVoted < 0)
|
||||
{
|
||||
$url = sprintf("doCallModuleAction('document','procDocumentVoteUp','%s')", $document_srl);
|
||||
$oDocumentController->addDocumentPopupMenu($url,'cmd_vote','','javascript');
|
||||
}
|
||||
elseif($oDocument->getVoted() > 0)
|
||||
elseif($oDocumentisVoted > 0)
|
||||
{
|
||||
$url = sprintf("doCallModuleAction('document','procDocumentVoteUpCancel','%s')", $document_srl);
|
||||
$oDocumentController->addDocumentPopupMenu($url,'cmd_cancel_vote','','javascript');
|
||||
|
|
@ -465,12 +466,12 @@ class documentModel extends document
|
|||
|
||||
if($document_config->use_vote_down!='N' && $member_srl!=$this->user->member_srl)
|
||||
{
|
||||
if($oDocument->getVoted() === false || $oDocument->getVoted() > 0)
|
||||
if($oDocumentisVoted === false || $oDocumentisVoted > 0)
|
||||
{
|
||||
$url = sprintf("doCallModuleAction('document','procDocumentVoteDown','%s')", $document_srl);
|
||||
$oDocumentController->addDocumentPopupMenu($url,'cmd_vote_down','','javascript');
|
||||
}
|
||||
else if($oDocument->getVoted() < 0)
|
||||
else if($oDocumentisVoted < 0)
|
||||
{
|
||||
$url = sprintf("doCallModuleAction('document','procDocumentVoteDownCancel','%s')", $document_srl);
|
||||
$oDocumentController->addDocumentPopupMenu($url,'cmd_cancel_vote_down','','javascript');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue