mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-05-10 20:44:28 +09:00
Fix missing category list if main board has no categories but included boards have categories #2437
This commit is contained in:
parent
7539d18c60
commit
33c1d9a117
1 changed files with 22 additions and 4 deletions
|
|
@ -221,9 +221,10 @@ class BoardView extends Board
|
||||||
/**
|
/**
|
||||||
* @brief display the category list
|
* @brief display the category list
|
||||||
**/
|
**/
|
||||||
function dispBoardCategoryList(){
|
public function dispBoardCategoryList()
|
||||||
|
{
|
||||||
// check if the use_category option is enabled
|
// check if the use_category option is enabled
|
||||||
if($this->module_info->use_category=='Y')
|
if ($this->module_info->use_category === 'Y' || !empty($this->include_modules))
|
||||||
{
|
{
|
||||||
// check the grant
|
// check the grant
|
||||||
if(!$this->grant->list)
|
if(!$this->grant->list)
|
||||||
|
|
@ -238,16 +239,33 @@ class BoardView extends Board
|
||||||
$category_list = DocumentModel::getCategoryList($this->module_srl);
|
$category_list = DocumentModel::getCategoryList($this->module_srl);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
|
if ($this->module_info->use_category === 'Y')
|
||||||
{
|
{
|
||||||
$category_list = DocumentModel::getCategoryList($this->module_srl);
|
$category_list = DocumentModel::getCategoryList($this->module_srl);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$category_list = [];
|
||||||
|
}
|
||||||
|
|
||||||
foreach ($this->include_modules as $module_srl)
|
foreach ($this->include_modules as $module_srl)
|
||||||
{
|
{
|
||||||
if ($module_srl != $this->module_srl)
|
if ($module_srl != $this->module_srl)
|
||||||
|
{
|
||||||
|
if ((ModuleModel::getModuleExtraVars($module_srl)->hide_category ?? 'N') !== 'Y')
|
||||||
{
|
{
|
||||||
$category_list += DocumentModel::getCategoryList($module_srl);
|
$category_list += DocumentModel::getCategoryList($module_srl);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ($category_list)
|
||||||
|
{
|
||||||
|
$this->module_info->hide_category = 'N';
|
||||||
|
$this->module_info->use_category = 'Y';
|
||||||
|
}
|
||||||
|
}
|
||||||
Context::set('category_list', $category_list);
|
Context::set('category_list', $category_list);
|
||||||
|
|
||||||
$oSecurity = new Security();
|
$oSecurity = new Security();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue