mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Merge branch 'lansi951-return_vote' into develop
This commit is contained in:
commit
83f146ed36
2 changed files with 18 additions and 3 deletions
|
|
@ -1107,7 +1107,17 @@ class commentController extends comment
|
|||
$_SESSION['voted_comment'][$comment_srl] = TRUE;
|
||||
|
||||
// Return the result
|
||||
return new Object(0, $success_message);
|
||||
$output = new Object(0, $success_message);
|
||||
if($point > 0)
|
||||
{
|
||||
$output->add('voted_count', $obj->after_point);
|
||||
}
|
||||
else
|
||||
{
|
||||
$output->add('blamed_count', $obj->after_point);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -1143,14 +1143,19 @@ class documentController extends document
|
|||
$_SESSION['voted_document'][$document_srl] = true;
|
||||
|
||||
// Return result
|
||||
$output = new Object();
|
||||
if($point > 0)
|
||||
{
|
||||
return new Object(0, 'success_voted');
|
||||
$output->setMessage('success_voted');
|
||||
$output->add('voted_count', $obj->after_point);
|
||||
}
|
||||
else
|
||||
{
|
||||
return new Object(0, 'success_blamed');
|
||||
$output->setMessage('success_blamed');
|
||||
$output->add('blamed_count', $obj->after_point);
|
||||
}
|
||||
|
||||
return $output;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue