mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
Update document, comment, file modules to throw exceptions
This commit is contained in:
parent
5be05dd875
commit
ad00ac800b
11 changed files with 142 additions and 110 deletions
|
|
@ -73,7 +73,7 @@ class commentView extends comment
|
|||
// A message appears if the user is not logged-in
|
||||
if(!$oMemberModel->isLogged())
|
||||
{
|
||||
return $this->stop('msg_not_logged');
|
||||
throw new Rhymix\Framework\Exceptions\MustLogin;
|
||||
}
|
||||
|
||||
// Create the comment object.
|
||||
|
|
@ -82,12 +82,12 @@ class commentView extends comment
|
|||
$oComment = $oCommentModel->getComment($comment_srl);
|
||||
if(!$oComment->isExists())
|
||||
{
|
||||
return $this->setError('msg_invalid_request');
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
// Check permissions
|
||||
if(!$oComment->isAccessible())
|
||||
{
|
||||
return $this->setError('msg_not_permitted');
|
||||
throw new Rhymix\Framework\Exceptions\NotPermitted;
|
||||
}
|
||||
|
||||
// Browser title settings
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue