문자열을 숫자로 변경

This commit is contained in:
qw5414 2016-01-22 13:17:47 +09:00
parent 43a6caeb36
commit 31ea80a380
2 changed files with 5 additions and 5 deletions

View file

@ -85,7 +85,7 @@
<ul>
<li>
<a cond="$oDocument->getVoted() === false" href="#" onclick="doCallModuleAction('document','procDocumentVoteUp','{$oDocument->document_srl}');return false;"|cond="$is_logged" class="voted"> <i class="xi-thumbs-up"></i><br>{$lang->cmd_vote} {$oDocument->get('voted_count')}</a>
<a cond="$oDocument->getVoted() === 'voted'" href="#" onclick="doCallModuleAction('document','procDocumentVoteUpCancel','{$oDocument->document_srl}');return false;"|cond="$is_logged" class="voted"> <i class="xi-thumbs-up"></i><br>{$lang->cmd_vote} {$oDocument->get('voted_count')}</a>
<a cond="$oDocument->getVoted() > 0" href="#" onclick="doCallModuleAction('document','procDocumentVoteUpCancel','{$oDocument->document_srl}');return false;"|cond="$is_logged" class="voted"> <i class="xi-thumbs-up"></i><br>{$lang->cmd_vote} {$oDocument->get('voted_count')}</a>
</li>
</ul>
</div>

View file

@ -374,11 +374,11 @@ class documentItem extends Object
if(!$this->document_srl) return;
if($_SESSION['voted_document'][$this->document_srl] == '1')
{
return 'voted';
return 1;
}
else if($_SESSION['voted_document'][$this->document_srl] == '-1')
{
return 'blamed';
return -1;
}
$logged_info = Context::get('logged_info');
@ -390,11 +390,11 @@ class documentItem extends Object
if($output->data->point === '1')
{
return 'voted';
return 1;
}
else if($output->data->point === '-1')
{
return 'blamed';
return -1;
}
return false;