Web: Load the new config files for shared items

refs #10246
This commit is contained in:
Johannes Meyer 2015-09-30 11:38:51 +02:00
parent 037fee298b
commit 633dca6b76
1 changed files with 4 additions and 4 deletions

View File

@ -179,12 +179,12 @@ class Web extends EmbeddedWeb
*/ */
public function getSharedNavigation($type) public function getSharedNavigation($type)
{ {
$config = Config::app('navigation')->getConfigObject(); $config = Config::navigation($type === 'dashboard-pane' ? 'dashlet' : $type);
$config->setKeyColumn('name'); $config->getConfigObject()->setKeyColumn('name');
if ($type === 'dashboard-pane') { if ($type === 'dashboard-pane') {
$panes = array(); $panes = array();
foreach ($config->select()->where('type', 'dashlet') as $dashletName => $dashletConfig) { foreach ($config as $dashletName => $dashletConfig) {
if ($this->hasAccessToSharedNavigationItem($dashletConfig)) { if ($this->hasAccessToSharedNavigationItem($dashletConfig)) {
// TODO: Throw ConfigurationError if pane or url is missing // TODO: Throw ConfigurationError if pane or url is missing
$panes[$dashletConfig->pane][$dashletName] = $dashletConfig->url; $panes[$dashletConfig->pane][$dashletName] = $dashletConfig->url;
@ -203,7 +203,7 @@ class Web extends EmbeddedWeb
} }
} else { } else {
$items = array(); $items = array();
foreach ($config->select()->where('type', $type) as $name => $typeConfig) { foreach ($config as $name => $typeConfig) {
if ($this->hasAccessToSharedNavigationItem($typeConfig)) { if ($this->hasAccessToSharedNavigationItem($typeConfig)) {
$items[$name] = $typeConfig; $items[$name] = $typeConfig;
} }