From b0f15f61f34db872252c9f14b18d3d62a51e3a81 Mon Sep 17 00:00:00 2001 From: hickert Date: Tue, 28 Sep 2010 13:27:17 +0000 Subject: [PATCH] Updated Device handling -Do not display anything if there occured an error git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@19837 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/Config/class_DeviceConfig.inc | 33 ++++++++++++------- 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc b/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc index 9aa0b028a..b885f495d 100644 --- a/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc +++ b/gosa-plugins/goto/admin/systems/goto/Config/class_DeviceConfig.inc @@ -55,7 +55,9 @@ class DeviceConfig extends management } if(!$root){ echo 'No root found!'; + $this->rebuildListing(); return; + $this->is_account = FALSE; } $this->is_account = TRUE; @@ -107,6 +109,25 @@ class DeviceConfig extends management */ function renderList() { + // Do we represent a valid account + if (!$this->is_account){ + $str = "\"\" ". + msgPool::noValidExtension("GOsa").""; + return($str); + } + + // Collect item container list to be able to render the fake-base selector + if(!$this->itemContainerSelector){ + $this->itemContainerSelector = new releaseSelector( + $this->getContainerList(), + $this->base, + $this->currentItemValues['root']['base']); + }else{ + $this->itemContainerSelector->setBases($this->getContainerList()); + } + $this->itemContainerSelector->update(true); + $this->itemContainerSelector->setBase($this->base); + $tpl = $this->TemplateEngine->render(); session::set('DEVICE_ITEMS', $this->currentItemValues); $this->rebuildListing(); @@ -141,18 +162,6 @@ class DeviceConfig extends management */ function rebuildListing() { - // Collect item container list to be able to render the fake-base selector - if(!$this->itemContainerSelector){ - $this->itemContainerSelector = new releaseSelector( - $this->getContainerList(), - $this->base, - $this->currentItemValues['root']['base']); - }else{ - $this->itemContainerSelector->setBases($this->getContainerList()); - } - $this->itemContainerSelector->update(true); - $this->itemContainerSelector->setBase($this->base); - // Build filter if (session::global_is_set(get_class($this)."_filter")){ $filter= session::global_get(get_class($this)."_filter"); -- 2.30.2