mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-05 09:41:40 +09:00
코드 개선
This commit is contained in:
parent
d641e2cc0e
commit
c2b78f4468
2 changed files with 10 additions and 18 deletions
|
|
@ -372,13 +372,9 @@ class documentItem extends Object
|
|||
function getVoted()
|
||||
{
|
||||
if(!$this->document_srl) return;
|
||||
if($_SESSION['voted_document'][$this->document_srl] == '1')
|
||||
if($_SESSION['voted_document'][$this->document_srl])
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if($_SESSION['voted_document'][$this->document_srl] == '-1')
|
||||
{
|
||||
return -1;
|
||||
return $_SESSION['voted_document'][$this->document_srl];
|
||||
}
|
||||
|
||||
$logged_info = Context::get('logged_info');
|
||||
|
|
@ -388,13 +384,9 @@ class documentItem extends Object
|
|||
$args->document_srl = $this->document_srl;
|
||||
$output = executeQuery('document.getDocumentVotedLog', $args);
|
||||
|
||||
if($output->data->point === '1')
|
||||
if($output->data->point)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
else if($output->data->point === '-1')
|
||||
{
|
||||
return -1;
|
||||
return $output->data->point;
|
||||
}
|
||||
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue