Improve compatibility with old ncenterlite skins

This commit is contained in:
Kijin Sung 2020-12-19 22:43:26 +09:00
parent 824d0c5ae9
commit b5b74644e5
2 changed files with 31 additions and 6 deletions

View file

@ -66,10 +66,16 @@ class ncenterliteView extends ncenterlite
}
}
$user_config = NcenterliteModel::getUserConfig($member_srl);
$notify_types = NcenterliteModel::getNotifyTypes();
foreach ($notify_types as $type => $srl)
{
$user_config->{$type . '_notify'} = $user_config->{$type} ? 'Y' : 'N';
}
Context::set('member_info', $member_info);
Context::set('user_config', NcenterliteModel::getUserConfig($member_srl));
Context::set('notify_types', $notify_types);
Context::set('user_config', $user_config);
Context::set('module_config', NcenterliteModel::getConfig());
Context::set('notify_types', NcenterliteModel::getNotifyTypes());
Context::set('sms_available', Rhymix\Framework\SMS::getDefaultDriver()->getName() !== 'Dummy');
Context::set('push_available', count(Rhymix\Framework\Config::get('push.types')) > 0);
$this->setTemplateFile('userconfig');