mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
비추천도 취소할 수 있도록 개선
This commit is contained in:
parent
31ea80a380
commit
d3d7031730
3 changed files with 40 additions and 3 deletions
|
|
@ -66,9 +66,11 @@ class documentController extends document
|
|||
$args->voted_count = $oDocument->get('voted_count') - 1;
|
||||
$output = executeQuery('document.updateVotedCount', $args);
|
||||
$d_output = executeQuery('document.deleteDocumentVotedLog', $d_args);
|
||||
|
||||
//session reset
|
||||
$_SESSION['voted_document'][$document_srl] = false;
|
||||
|
||||
$output = new Object();
|
||||
$output->setMessage('success_voted_canceled');
|
||||
return $output;
|
||||
}
|
||||
|
|
@ -118,6 +120,37 @@ class documentController extends document
|
|||
return $output;
|
||||
}
|
||||
|
||||
function procDocumentVoteDownCancel()
|
||||
{
|
||||
if(!Context::get('is_logged')) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$document_srl = Context::get('target_srl');
|
||||
if(!$document_srl) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$oDocumentModel = getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl, false, false);
|
||||
if($oDocument->get('blamed_count') >= 0)
|
||||
{
|
||||
return new Object(-1, 'msg_document_voted_cancel_not');
|
||||
}
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
||||
$args = new stdClass();
|
||||
$d_args = new stdClass();
|
||||
$args->document_srl = $d_args->document_srl = $document_srl;
|
||||
$d_args->member_srl = $logged_info->member_srl;
|
||||
$args->blamed_count = $oDocument->get('blamed_count') + 1;
|
||||
$output = executeQuery('document.updateBlamedCount', $args);
|
||||
$d_output = executeQuery('document.deleteDocumentVotedLog', $d_args);
|
||||
|
||||
//session reset
|
||||
$_SESSION['voted_document'][$document_srl] = false;
|
||||
|
||||
$output = new Object();
|
||||
$output->setMessage('success_blamed_canceled');
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
* Action called when the post is reported by other member
|
||||
* @return void|Object
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue