코드 개선

This commit is contained in:
qw5414 2016-01-23 19:22:11 +09:00
parent d641e2cc0e
commit c2b78f4468
2 changed files with 10 additions and 18 deletions

View file

@ -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;