* Modify lite menu.
This commit is contained in:
+33
-34
@@ -411,44 +411,42 @@ class devModel extends model
|
||||
|
||||
$langKey = '';
|
||||
$customeds = array();
|
||||
if($type == 'common')
|
||||
switch($type)
|
||||
{
|
||||
$customeds = $this->loadModel('custom')->getItems("lang={$language}&module=common§ion=&vision={$this->config->vision}");
|
||||
foreach($customeds as $customed) $customedLangs[$customed->key] = $customed->value;
|
||||
case 'common':
|
||||
$customeds = $this->loadModel('custom')->getItems("lang={$language}&module=common§ion=&vision={$this->config->vision}");
|
||||
foreach($customeds as $customed) $customedLangs[$customed->key] = $customed->value;
|
||||
|
||||
$customedLangs['URCommon'] = $this->lang->dev->UR == $this->lang->URCommon ? '' : $this->lang->URCommon;
|
||||
$customedLangs['SRCommon'] = $this->lang->dev->SR == $this->lang->SRCommon ? '' : $this->lang->SRCommon;
|
||||
if($this->config->custom->URSR)
|
||||
{
|
||||
$URSRList = $this->custom->getItems("lang={$language}&module=custom§ion=URSRList&key={$this->config->custom->URSR}&vision={$this->config->vision}");
|
||||
$URSRList = array_shift($URSRList);
|
||||
if($URSRList)
|
||||
$customedLangs['URCommon'] = $this->lang->dev->UR == $this->lang->URCommon ? '' : $this->lang->URCommon;
|
||||
$customedLangs['SRCommon'] = $this->lang->dev->SR == $this->lang->SRCommon ? '' : $this->lang->SRCommon;
|
||||
if($this->config->custom->URSR)
|
||||
{
|
||||
$URSRList = json_decode($URSRList->value);
|
||||
$customedLangs['URCommon'] = $this->lang->dev->UR == $URSRList->URName ? '' : $URSRList->URName;
|
||||
$customedLangs['SRCommon'] = $this->lang->dev->SR == $URSRList->SRName ? '' : $URSRList->SRName;
|
||||
$URSRList = $this->custom->getItems("lang={$language}&module=custom§ion=URSRList&key={$this->config->custom->URSR}&vision={$this->config->vision}");
|
||||
$URSRList = array_shift($URSRList);
|
||||
if($URSRList)
|
||||
{
|
||||
$URSRList = json_decode($URSRList->value);
|
||||
$customedLangs['URCommon'] = $this->lang->dev->UR == $URSRList->URName ? '' : $URSRList->URName;
|
||||
$customedLangs['SRCommon'] = $this->lang->dev->SR == $URSRList->SRName ? '' : $URSRList->SRName;
|
||||
}
|
||||
}
|
||||
}
|
||||
if(!$this->config->URAndSR) unset($customedLangs['SRCommon']);
|
||||
}
|
||||
elseif($type == 'first')
|
||||
{
|
||||
$customeds = $this->loadModel('custom')->getItems("lang={$language}&module=common§ion=mainNav&vision={$this->config->vision}");
|
||||
$langKey = 'mainNav_';
|
||||
}
|
||||
elseif($type == 'second')
|
||||
{
|
||||
$customeds = $this->loadModel('custom')->getItems("lang={$language}&module={$module}Menu&vision={$this->config->vision}");
|
||||
}
|
||||
elseif($type == 'third')
|
||||
{
|
||||
$customeds = $this->loadModel('custom')->getItems("lang={$language}&module={$module}SubMenu§ion=$method&vision={$this->config->vision}");
|
||||
$langKey = "{$method}_";
|
||||
}
|
||||
elseif($type == 'feature')
|
||||
{
|
||||
$customeds = $this->loadModel('custom')->getItems("lang={$language}&module={$module}§ion=featureBar-$method&vision={$this->config->vision}");
|
||||
$langKey = "featureBar-{$method}_";
|
||||
if(!$this->config->URAndSR) unset($customedLangs['SRCommon']);
|
||||
break;
|
||||
case 'first':
|
||||
$customeds = $this->loadModel('custom')->getItems("lang={$language}&module=common§ion=mainNav&vision={$this->config->vision}");
|
||||
$langKey = 'mainNav_';
|
||||
break;
|
||||
case 'second':
|
||||
$customeds = $this->loadModel('custom')->getItems("lang={$language}&module={$module}Menu&vision={$this->config->vision}");
|
||||
break;
|
||||
case 'third':
|
||||
$customeds = $this->loadModel('custom')->getItems("lang={$language}&module={$module}SubMenu§ion=$method&vision={$this->config->vision}");
|
||||
$langKey = "{$method}_";
|
||||
break;
|
||||
case 'feature':
|
||||
$customeds = $this->loadModel('custom')->getItems("lang={$language}&module={$module}§ion=featureBar-$method&vision={$this->config->vision}");
|
||||
$langKey = "featureBar-{$method}_";
|
||||
break;
|
||||
}
|
||||
|
||||
foreach($customeds as $customed)
|
||||
@@ -657,6 +655,7 @@ class devModel extends model
|
||||
$childFunc = 'get' . ucfirst($type) . 'Menus';
|
||||
$menuItem->children = $this->$childFunc($menuKey, $module, $method);
|
||||
if($type != 'second' and empty($menuItem->children)) continue;
|
||||
if($type == 'second' and in_array($menuKey, $this->config->dev->hideMainMenu)) continue;
|
||||
|
||||
$menuTree[] = $menuItem;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user