mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-06 10:11:38 +09:00
Add settings for combined board
This commit is contained in:
parent
a9334cec95
commit
264c6f0e74
6 changed files with 82 additions and 2 deletions
|
|
@ -12,13 +12,16 @@ class boardAdminController extends board {
|
|||
/**
|
||||
* @brief initialization
|
||||
**/
|
||||
function init() {
|
||||
function init()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief insert borad module
|
||||
**/
|
||||
function procBoardAdminInsertBoard($args = null) {
|
||||
function procBoardAdminInsertBoard($args = null)
|
||||
{
|
||||
// generate module model/controller object
|
||||
$oModuleController = getController('module');
|
||||
$oModuleModel = getModel('module');
|
||||
|
|
@ -163,6 +166,42 @@ class boardAdminController extends board {
|
|||
$this->setMessage('success_deleted');
|
||||
}
|
||||
|
||||
/**
|
||||
* Save settings for combined board.
|
||||
*/
|
||||
public function procBoardAdminInsertCombinedConfig()
|
||||
{
|
||||
$vars = Context::getRequestVars();
|
||||
$module_srl = intval($vars->target_module_srl);
|
||||
$include_modules = array_map('intval', $vars->include_modules ?: []);
|
||||
|
||||
$module_info = ModuleModel::getModuleInfoByModuleSrl($module_srl);
|
||||
if (!$module_info)
|
||||
{
|
||||
throw new Rhymix\Framework\Exceptions\TargetNotFound;
|
||||
}
|
||||
|
||||
$module_info->include_modules = implode(',', array_filter($include_modules, function($item) {
|
||||
return $item > 0;
|
||||
}));
|
||||
|
||||
$output = getController('module')->updateModule($module_info);
|
||||
if (!$output->toBool())
|
||||
{
|
||||
return $output;
|
||||
}
|
||||
|
||||
$this->setMessage('success_updated');
|
||||
if (Context::get('success_return_url'))
|
||||
{
|
||||
$this->setRedirectUrl(Context::get('success_return_url'));
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->setRedirectUrl(getNotEncodedUrl('', 'module', 'admin', 'act', 'dispBoardAdminBoardAdditionSetup', 'module_srl', $module_srl));
|
||||
}
|
||||
}
|
||||
|
||||
function procBoardAdminSaveCategorySettings()
|
||||
{
|
||||
$module_srl = Context::get('module_srl');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue