mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-04-26 22:02:13 +09:00
Add FeatureDisabled and SecurityViolation exception classes
This commit is contained in:
parent
88dc76501a
commit
10c8d11785
11 changed files with 33 additions and 29 deletions
|
|
@ -347,7 +347,7 @@ class documentController extends document
|
|||
{
|
||||
if(!$manual_inserted && !checkCSRF())
|
||||
{
|
||||
return new BaseObject(-1, 'msg_invalid_request');
|
||||
return new BaseObject(-1, 'msg_security_violation');
|
||||
}
|
||||
|
||||
// begin transaction
|
||||
|
|
@ -576,7 +576,7 @@ class documentController extends document
|
|||
{
|
||||
if(!$manual_updated && !checkCSRF())
|
||||
{
|
||||
return new BaseObject(-1, 'msg_invalid_request');
|
||||
return new BaseObject(-1, 'msg_security_violation');
|
||||
}
|
||||
|
||||
if(!$source_obj->document_srl || !$obj->document_srl) return new BaseObject(-1, 'msg_invalied_request');
|
||||
|
|
|
|||
|
|
@ -1153,12 +1153,12 @@ class documentModel extends document
|
|||
$document_config = $oModuleModel->getModulePartConfig('document',$module_srl);
|
||||
if($point == -1)
|
||||
{
|
||||
if($document_config->use_vote_down!='S') throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
if($document_config->use_vote_down!='S') throw new Rhymix\Framework\Exceptions\FeatureDisabled;
|
||||
$args->below_point = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if($document_config->use_vote_up!='S') throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
if($document_config->use_vote_up!='S') throw new Rhymix\Framework\Exceptions\FeatureDisabled;
|
||||
$args->more_point = 0;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue