mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
ticket:456 Vote/Blame 구분
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@4140 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
8574cd797f
commit
0958542826
7 changed files with 50 additions and 4 deletions
|
|
@ -402,17 +402,29 @@
|
|||
}
|
||||
|
||||
// 추천수 업데이트
|
||||
$args->voted_count = $oDocument->get('voted_count') + $point;
|
||||
$output = executeQuery('document.updateVotedCount', $args);
|
||||
if($point < 0)
|
||||
{
|
||||
$args->blamed_count = $oDocument->get('blamed_count') + $point;
|
||||
$output = executeQuery('document.updateBlamedCount', $args);
|
||||
}
|
||||
else
|
||||
{
|
||||
$args->voted_count = $oDocument->get('voted_count') + $point;
|
||||
$output = executeQuery('document.updateVotedCount', $args);
|
||||
}
|
||||
|
||||
// 로그 남기기
|
||||
$args->point = $point;
|
||||
$output = executeQuery('document.insertDocumentVotedLog', $args);
|
||||
|
||||
// 세션 정보에 남김
|
||||
$_SESSION['voted_document'][$document_srl] = true;
|
||||
|
||||
// 결과 리턴
|
||||
return new Object(0, 'success_voted');
|
||||
if($point > 0)
|
||||
return new Object(0, 'success_voted');
|
||||
else
|
||||
return new Object(0, 'success_blamed');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue