mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 01:01:41 +09:00
Move non-member voting, vote canceling, and report canceling options from Board module to Document & Comment modules
This commit is contained in:
parent
103f5ce884
commit
3215631dfc
13 changed files with 454 additions and 192 deletions
|
|
@ -174,10 +174,47 @@ class DocumentView extends Document
|
|||
{
|
||||
$document_config = new stdClass();
|
||||
}
|
||||
if(!isset($document_config->use_history)) $document_config->use_history = 'N';
|
||||
if(!isset($document_config->use_history))
|
||||
{
|
||||
$document_config->use_history = 'N';
|
||||
}
|
||||
if(!isset($document_config->use_vote_up))
|
||||
{
|
||||
$document_config->use_vote_up = 'Y';
|
||||
}
|
||||
if(!isset($document_config->use_vote_down))
|
||||
{
|
||||
$document_config->use_vote_down = 'Y';
|
||||
}
|
||||
if(!isset($document_config->allow_vote_from_same_ip))
|
||||
{
|
||||
$document_config->allow_vote_from_same_ip = 'N';
|
||||
}
|
||||
if(!isset($document_config->allow_declare_from_same_ip))
|
||||
{
|
||||
$document_config->allow_declare_from_same_ip = 'N';
|
||||
}
|
||||
|
||||
if ($current_module_srl)
|
||||
{
|
||||
$module_info = ModuleModel::getModuleInfoByModuleSrl($current_module_srl);
|
||||
if (!isset($document_config->allow_vote_cancel))
|
||||
{
|
||||
$document_config->allow_vote_cancel = (($module_info->cancel_vote ?? 'N') === 'Y') ? 'Y' : 'N';
|
||||
}
|
||||
if (!isset($document_config->allow_vote_non_member))
|
||||
{
|
||||
$document_config->allow_vote_non_member = (($module_info->non_login_vote ?? 'N') === 'Y') ? 'Y' : 'N';
|
||||
}
|
||||
if (!isset($document_config->allow_declare_cancel))
|
||||
{
|
||||
$document_config->allow_declare_cancel = (($module_info->cancel_vote ?? 'N') === 'Y') ? 'Y' : 'N';
|
||||
}
|
||||
}
|
||||
|
||||
Context::set('document_config', $document_config);
|
||||
|
||||
$oTemplate = &TemplateHandler::getInstance();
|
||||
$oTemplate = TemplateHandler::getInstance();
|
||||
$tpl = $oTemplate->compile($this->module_path.'tpl', 'document_module_config');
|
||||
$obj = $tpl . $obj;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue