mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-14 16:02:14 +09:00
코드 개선
This commit is contained in:
parent
d641e2cc0e
commit
c2b78f4468
2 changed files with 10 additions and 18 deletions
|
|
@ -133,8 +133,8 @@ class documentController extends document
|
|||
|
||||
/**
|
||||
* Update Document Voted Cancel
|
||||
* @param stdClass $args
|
||||
* @param stdClass $d_args
|
||||
* @param int $document_srl
|
||||
* @param Document $oDocument
|
||||
* @param int $point
|
||||
* @return object
|
||||
*/
|
||||
|
|
@ -148,12 +148,12 @@ class documentController extends document
|
|||
$d_args->member_srl = $logged_info->member_srl;
|
||||
if($point > 0)
|
||||
{
|
||||
$args->voted_count = $oDocument->get('voted_count') - 1;
|
||||
$args->voted_count = $oDocument->get('voted_count') - $point;
|
||||
$output = executeQuery('document.updateVotedCount', $args);
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->blamed_count = $oDocument->get('blamed_count') + 1;
|
||||
$args->blamed_count = $oDocument->get('blamed_count') - $point;
|
||||
$output = executeQuery('document.updateBlamedCount', $args);
|
||||
}
|
||||
$d_output = executeQuery('document.deleteDocumentVotedLog', $d_args);
|
||||
|
|
@ -1295,14 +1295,14 @@ class documentController extends document
|
|||
{
|
||||
$args->blamed_count = $oDocument->get('blamed_count') + $point;
|
||||
// Leave in the session information
|
||||
$_SESSION['voted_document'][$document_srl] = -1;
|
||||
$_SESSION['voted_document'][$document_srl] = $point;
|
||||
$output = executeQuery('document.updateBlamedCount', $args);
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->voted_count = $oDocument->get('voted_count') + $point;
|
||||
// Leave in the session information
|
||||
$_SESSION['voted_document'][$document_srl] = 1;
|
||||
$_SESSION['voted_document'][$document_srl] = $point;
|
||||
$output = executeQuery('document.updateVotedCount', $args);
|
||||
}
|
||||
if(!$output->toBool()) return $output;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue