mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 18:21:39 +09:00
개별 문서 댓글 알림을 차단하는 옵션 추가
This commit is contained in:
parent
7285a332b7
commit
c315a6ad10
15 changed files with 447 additions and 0 deletions
|
|
@ -71,4 +71,113 @@ class ncenterliteView extends ncenterlite
|
|||
Context::set('user_config', $output->data);
|
||||
$this->setTemplateFile('userconfig');
|
||||
}
|
||||
|
||||
function dispNcenterliteIndividualBlockList()
|
||||
{
|
||||
/** @var ncenterliteModel $oNcenterliteModel */
|
||||
$oNcenterliteModel = getModel('ncenterlite');
|
||||
$config = $oNcenterliteModel->getConfig();
|
||||
|
||||
if($config->individual_block !== 'Y')
|
||||
{
|
||||
throw new Rhymix\Framework\Exception('msg_individual_block_not_support');
|
||||
}
|
||||
|
||||
if(!Rhymix\Framework\Session::getMemberSrl())
|
||||
{
|
||||
throw new Rhymix\Framework\Exception('ncenterlite_stop_login_required');
|
||||
}
|
||||
|
||||
$member_srl = Context::get('member_srl');
|
||||
|
||||
if(!$member_srl)
|
||||
{
|
||||
$member_srl = $this->user->member_srl;
|
||||
}
|
||||
|
||||
$args = new stdClass();
|
||||
$args->page = Context::get('page');
|
||||
$args->list_count = '20';
|
||||
$args->page_count = '10';
|
||||
$args->member_srl = $member_srl;
|
||||
$output = executeQuery('ncenterlite.getIndividualBlockList', $args);
|
||||
|
||||
Context::set('total_count', $output->page_navigation->total_count);
|
||||
Context::set('total_page', $output->page_navigation->total_page);
|
||||
Context::set('page', $output->page);
|
||||
Context::set('individual_list', $output->data);
|
||||
Context::set('page_navigation', $output->page_navigation);
|
||||
|
||||
$this->setTemplateFile('individualList');
|
||||
}
|
||||
|
||||
function dispNcenterliteInsertIndividualBlock()
|
||||
{
|
||||
/** @var ncenterliteModel $oNcenterliteModel */
|
||||
$oNcenterliteModel = getModel('ncenterlite');
|
||||
$target_srl = Context::get('target_srl');
|
||||
$individual_srl = Context::get('individual_srl');
|
||||
$individual_type = Context::get('individual_type');
|
||||
|
||||
$member_srl = Context::get('member_srl');
|
||||
|
||||
if($individual_srl)
|
||||
{
|
||||
$output = $oNcenterliteModel->getUserIndividualBlockConfigByIndividualSrl($individual_srl);
|
||||
}
|
||||
else
|
||||
{
|
||||
$output = $oNcenterliteModel->getUserIndividualBlockConfigByTargetSrl($target_srl, $member_srl);
|
||||
}
|
||||
|
||||
|
||||
if((!$target_srl || !$individual_type) && !$output->data)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
|
||||
if($individual_type == 'document')
|
||||
{
|
||||
$text = getModel('document')->getDocument($target_srl)->get('title');
|
||||
$type = '문서';
|
||||
if(!$text)
|
||||
{
|
||||
$text = getModel('comment')->getComment($target_srl)->get('content');
|
||||
if(!$text)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
else
|
||||
{
|
||||
Context::set('individual_type', 'comment');
|
||||
$type = '댓글';
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$text = getModel('comment')->getComment($target_srl)->get('content');
|
||||
$type = '댓글';
|
||||
if(!$text)
|
||||
{
|
||||
$text = getModel('document')->getDocument($target_srl)->get('title');
|
||||
if(!$text)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\InvalidRequest;
|
||||
}
|
||||
else
|
||||
{
|
||||
Context::set('individual_type', 'document');
|
||||
$type = '문서';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('individualData', $output->data);
|
||||
Context::set('text', $text);
|
||||
Context::set('type', $type);
|
||||
|
||||
$this->setTemplateFile('individualBlock');
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue