mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-07 10:41:40 +09:00
Merge branch 'rhymix:master' into master
This commit is contained in:
commit
ef9967fc1d
81 changed files with 923 additions and 726 deletions
|
|
@ -2032,9 +2032,16 @@ class DocumentController extends Document
|
|||
}
|
||||
|
||||
// Return fail if session already has information about votes
|
||||
if(!empty($_SESSION['voted_document'][$document_srl]))
|
||||
if (!empty($_SESSION['voted_document'][$document_srl]))
|
||||
{
|
||||
return new BaseObject(-1, $failed_voted . '_already');
|
||||
if ($_SESSION['voted_document'][$document_srl] > 0)
|
||||
{
|
||||
return new BaseObject(-1, 'failed_voted_already');
|
||||
}
|
||||
else
|
||||
{
|
||||
return new BaseObject(-1, 'failed_blamed_already');
|
||||
}
|
||||
}
|
||||
|
||||
// Get the original document
|
||||
|
|
@ -2076,10 +2083,17 @@ class DocumentController extends Document
|
|||
$output = executeQuery('document.getDocumentVotedLogInfo', $args);
|
||||
|
||||
// Pass after registering a session if log information has vote-up logs
|
||||
if($output->data->count)
|
||||
if ($output->data->count)
|
||||
{
|
||||
$_SESSION['voted_document'][$document_srl] = false;
|
||||
return new BaseObject(-1, $failed_voted);
|
||||
$_SESSION['voted_document'][$document_srl] = intval($output->data->point);
|
||||
if ($output->data->point > 0)
|
||||
{
|
||||
return new BaseObject(-1, 'failed_voted_already');
|
||||
}
|
||||
else
|
||||
{
|
||||
return new BaseObject(-1, 'failed_blamed_already');
|
||||
}
|
||||
}
|
||||
|
||||
// Call a trigger (before)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue