mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-02 01:52:10 +09:00
Fix multiple queries for document/comment vote count
This commit is contained in:
parent
4f821bca85
commit
c227d188a7
6 changed files with 62 additions and 12 deletions
|
|
@ -1325,7 +1325,7 @@ class documentController extends document
|
|||
// Pass if the author's IP address is as same as visitor's.
|
||||
if($oDocument->get('ipaddress') == $_SERVER['REMOTE_ADDR'])
|
||||
{
|
||||
$_SESSION['voted_document'][$document_srl] = true;
|
||||
$_SESSION['voted_document'][$document_srl] = false;
|
||||
return new Object(-1, $failed_voted);
|
||||
}
|
||||
|
||||
|
|
@ -1339,7 +1339,7 @@ class documentController extends document
|
|||
// Pass after registering a session if author's information is same as the currently logged-in user's.
|
||||
if($member_srl && $member_srl == $oDocument->get('member_srl'))
|
||||
{
|
||||
$_SESSION['voted_document'][$document_srl] = true;
|
||||
$_SESSION['voted_document'][$document_srl] = false;
|
||||
return new Object(-1, $failed_voted);
|
||||
}
|
||||
}
|
||||
|
|
@ -1359,7 +1359,7 @@ class documentController extends document
|
|||
// Pass after registering a session if log information has vote-up logs
|
||||
if($output->data->count)
|
||||
{
|
||||
$_SESSION['voted_document'][$document_srl] = true;
|
||||
$_SESSION['voted_document'][$document_srl] = false;
|
||||
return new Object(-1, $failed_voted);
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue