mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-11 04:52:14 +09:00
parent
2840740286
commit
9389b96f95
2 changed files with 8 additions and 23 deletions
|
|
@ -250,25 +250,17 @@ class commentController extends comment
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Authorization of the comments
|
* Authorization of the comments
|
||||||
* @param int $comment_srl
|
* available only in the current connection of the session value
|
||||||
* @param bool $session
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function addGrant($comment_srl, $session = false)
|
function addGrant($comment_srl)
|
||||||
{
|
{
|
||||||
$comment = getModel('comment')->getComment($comment_srl);
|
$comment = getModel('comment')->getComment($comment_srl);
|
||||||
if ($comment->isExists())
|
if ($comment->isExists())
|
||||||
{
|
|
||||||
if ($session)
|
|
||||||
{
|
|
||||||
$comment->setGrantForSession();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
$comment->setGrant();
|
$comment->setGrant();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Check if module is using comment validation system
|
* Check if module is using comment validation system
|
||||||
|
|
@ -589,7 +581,7 @@ class commentController extends comment
|
||||||
// grant autority of the comment
|
// grant autority of the comment
|
||||||
if(!$manual_inserted)
|
if(!$manual_inserted)
|
||||||
{
|
{
|
||||||
$this->addGrant($obj->comment_srl, true);
|
$this->addGrant($obj->comment_srl);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(!$manual_inserted)
|
if(!$manual_inserted)
|
||||||
|
|
|
||||||
|
|
@ -325,25 +325,18 @@ class documentController extends document
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Grant a permisstion of the document
|
* Grant a permisstion of the document
|
||||||
|
* Available in the current connection with session value
|
||||||
* @param int $document_srl
|
* @param int $document_srl
|
||||||
* @param bool $session
|
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function addGrant($document_srl, $session = false)
|
function addGrant($document_srl)
|
||||||
{
|
{
|
||||||
$oDocument = getModel('document')->getDocument($document_srl);
|
$oDocument = getModel('document')->getDocument($document_srl);
|
||||||
if ($oDocument->isExists())
|
if ($oDocument->isExists())
|
||||||
{
|
|
||||||
if ($session)
|
|
||||||
{
|
|
||||||
$oDocument->setGrantForSession();
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
$oDocument->setGrant();
|
$oDocument->setGrant();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Insert the document
|
* Insert the document
|
||||||
|
|
@ -537,7 +530,7 @@ class documentController extends document
|
||||||
// return
|
// return
|
||||||
if(!$manual_inserted)
|
if(!$manual_inserted)
|
||||||
{
|
{
|
||||||
$this->addGrant($obj->document_srl, true);
|
$this->addGrant($obj->document_srl);
|
||||||
}
|
}
|
||||||
$output->add('document_srl',$obj->document_srl);
|
$output->add('document_srl',$obj->document_srl);
|
||||||
$output->add('category_srl',$obj->category_srl);
|
$output->add('category_srl',$obj->category_srl);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue