rhymix/modules/communication/communication.admin.controller.php
MinSoo Kim e75983768f Communication module mobile support enhancement
쪽지 모듈의 모바일 지원을 향상시켰습니다.
이 PR 이후에 회원 모듈의 모바일 지원을 향상 시키면 XE의 모바일 지원 수준이 한 단계 상승하게 됩니다.
꼭 반영되길 바랍니다!

## 수정 내용

* 커뮤니케이션 애드온의 회원 메뉴 설정 기능을 모듈의 트리거로 처리하여 조금 더 직관적으로 설정하게 됨.
* 기본값은 모듈이 동작 하도록 함.
* 모듈을 켜고 끌 수 있도록 함.
* 모바일에서 친구 추가를 할 수 있게 함.
* 스타일 아주 조금 다듬음.
2015-05-25 02:32:47 +09:00

97 lines
2.5 KiB
PHP

<?php
/* Copyright (C) NAVER <http://www.navercorp.com> */
/**
* @class communicationAdminController
* @author NAVER (developers@xpressengine.com)
* @brief communication module of the admin controller class
*/
class communicationAdminController extends communication
{
/**
* Initialization
*/
function init()
{
}
/**
* save configurations of the communication module
* @return void|Object (success : void, fail : Object)
*/
function procCommunicationAdminInsertConfig()
{
// Get the configuration information
$oModuleModel = getModel('module');
$config = $oModuleModel->getModuleConfig('communication');
// get the default information
$args = Context::gets('able_module', 'skin', 'colorset', 'editor_skin', 'sel_editor_colorset', 'mskin', 'mcolorset', 'layout_srl', 'mlayout_srl', 'grant_write_default','grant_write_group');
//if module IO config is off
if($args->able_module === 'Y')
{
// Re-install triggers, if it was disabled.
if($config->able_module == 'N')
{
$this->moduleUpdate();
}
$args->editor_colorset = $args->sel_editor_colorset;
unset($args->sel_editor_colorset);
if(!$args->skin)
{
$args->skin = 'default';
}
if(!$args->colorset)
{
$args->colorset = 'white';
}
if(!$args->editor_skin)
{
$args->editor_skin = 'default';
}
if(!$args->mskin)
{
$args->mskin = 'default';
}
if(!$args->layout_srl)
{
$args->layout_srl = NULL;
}
$oCommunicationModel = getModel('communication');
$args->grant_write = $oCommunicationModel->getGrantArray($args->grant_write_default, $args->grant_write_group);
unset($args->grant_write_default);
unset($args->grant_write_group);
}
else
{
//module IO config is OFF, Other settings will not be modified.
$config->able_module = 'N';
$args = $config;
// Delete Triggers
$oModuleController = getController('module');
$oModuleController->deleteModuleTriggers('communication');
}
// create the module module Controller object
$oModuleController = getController('module');
$output = $oModuleController->insertModuleConfig('communication', $args);
$returnUrl = Context::get('success_return_url') ? Context::get('success_return_url') : getNotEncodedUrl('', 'module', 'admin', 'act', 'dispCommunicationAdminConfig');
return $this->setRedirectUrl($returnUrl, $output);
}
}
/* End of file communication.admin.controller.php */
/* Location: ./modules/comment/communication.admin.controller.php */