mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-09 03:32:00 +09:00
#19560480 추천 비추천 기능개선
git-svn-id: http://xe-core.googlecode.com/svn/sandbox@8112 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
b230d45a71
commit
9b8e32d45b
10 changed files with 223 additions and 23 deletions
|
|
@ -22,6 +22,15 @@
|
|||
$document_srl = Context::get('target_srl');
|
||||
if(!$document_srl) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl, false, false);
|
||||
$module_srl = $oDocument->get('module_srl');
|
||||
if(!$module_srl) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$document_config = $oModuleModel->getModulePartConfig('document',$module_srl);
|
||||
if($document_config->use_vote_up=='N') return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$point = 1;
|
||||
return $this->updateVotedCount($document_srl, $point);
|
||||
}
|
||||
|
|
@ -45,6 +54,15 @@
|
|||
$document_srl = Context::get('target_srl');
|
||||
if(!$document_srl) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$oDocumentModel = &getModel('document');
|
||||
$oDocument = $oDocumentModel->getDocument($document_srl, false, false);
|
||||
$module_srl = $oDocument->get('module_srl');
|
||||
if(!$module_srl) return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$oModuleModel = &getModel('module');
|
||||
$document_config = $oModuleModel->getModulePartConfig('document',$module_srl);
|
||||
if($document_config->use_vote_down=='N') return new Object(-1, 'msg_invalid_request');
|
||||
|
||||
$point = -1;
|
||||
return $this->updateVotedCount($document_srl, $point);
|
||||
}
|
||||
|
|
@ -1638,6 +1656,14 @@
|
|||
$document_config->use_history = Context::get('use_history');
|
||||
if(!$document_config->use_history) $document_config->use_history = 'N';
|
||||
|
||||
$document_config->use_vote_up = Context::get('use_vote_up');
|
||||
if(!$document_config->use_vote_up) $document_config->use_vote_up = 'Y';
|
||||
if($document_config->use_vote_up!='Y') $document_config->use_vote_up = 'N';
|
||||
|
||||
$document_config->use_vote_down = Context::get('use_vote_down');
|
||||
if(!$document_config->use_vote_down) $document_config->use_vote_down = 'Y';
|
||||
if($document_config->use_vote_down!='Y') $document_config->use_vote_down = 'N';
|
||||
|
||||
$oModuleController = &getController('module');
|
||||
for($i=0;$i<count($module_srl);$i++) {
|
||||
$srl = trim($module_srl[$i]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue