mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-10 04:03:01 +09:00
issue 1110 add module category in mid list
git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@10843 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
fcbf5902db
commit
d8c49ddeae
5 changed files with 71 additions and 7 deletions
|
|
@ -540,6 +540,7 @@
|
|||
|
||||
$args->sort_index1 = 'sites.domain';
|
||||
|
||||
$moduleCategorySrl = array();
|
||||
// Get a list of modules at the site
|
||||
$output = executeQueryArray('module.getSiteModules', $args);
|
||||
$mid_list = array();
|
||||
|
|
@ -556,16 +557,53 @@
|
|||
$obj->layout_srl = $val->layout_srl;
|
||||
$obj->browser_title = $val->browser_title;
|
||||
$obj->mid = $val->mid;
|
||||
$obj->module_category_srl = $val->module_category_srl;
|
||||
if($val->module_category_srl > 0)
|
||||
{
|
||||
array_push($moduleCategorySrl, $val->module_category_srl);
|
||||
}
|
||||
$mid_list[$module]->list[$val->mid] = $obj;
|
||||
}
|
||||
}
|
||||
|
||||
// Get module category name
|
||||
$moduleCategorySrl = array_unique($moduleCategorySrl);
|
||||
$output = $oModuleModel->getModuleCategories($moduleCategorySrl);
|
||||
$categoryNameList = array();
|
||||
if(is_array($output))
|
||||
{
|
||||
foreach($output AS $key=>$value)
|
||||
{
|
||||
$categoryNameList[$value->module_category_srl] = $value->title;
|
||||
}
|
||||
}
|
||||
|
||||
$selected_module = Context::get('selected_module');
|
||||
if(count($mid_list)) {
|
||||
foreach($mid_list as $module => $val) {
|
||||
if(!$selected_module) $selected_module = $module;
|
||||
$xml_info = $oModuleModel->getModuleInfoXml($module);
|
||||
$mid_list[$module]->title = $xml_info->title;
|
||||
|
||||
// change module category srl to title
|
||||
if(is_array($val->list))
|
||||
{
|
||||
foreach($val->list AS $key=>$value)
|
||||
{
|
||||
if($value->module_category_srl > 0)
|
||||
{
|
||||
$categorySrl = $mid_list[$module]->list[$key]->module_category_srl;
|
||||
if(isset($categoryNameList[$categorySrl]))
|
||||
{
|
||||
$mid_list[$module]->list[$key]->module_category_srl = $categoryNameList[$categorySrl];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
$mid_list[$module]->list[$key]->module_category_srl = Context::getLang('none_category');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue