From: hickert Date: Fri, 7 Oct 2005 07:47:09 +0000 (+0000) Subject: Fixed several undefined index errors if no entry was shown X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=91b68d546508a72b2b6f3b9441260423105dae8c;p=gosa.git Fixed several undefined index errors if no entry was shown git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@1529 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/plugins/admin/fai/class_faiManagement.inc b/plugins/admin/fai/class_faiManagement.inc index c6663ea20..b600298a1 100644 --- a/plugins/admin/fai/class_faiManagement.inc +++ b/plugins/admin/fai/class_faiManagement.inc @@ -556,7 +556,7 @@ class faiManagement extends plugin $info = _("Templates"); break; default : - $img="";$info = "";break; + $img="";$info = "";break; } diff --git a/plugins/admin/fai/class_faiProfileEntry.inc b/plugins/admin/fai/class_faiProfileEntry.inc index 24298a312..ef83d1c84 100644 --- a/plugins/admin/fai/class_faiProfileEntry.inc +++ b/plugins/admin/fai/class_faiProfileEntry.inc @@ -20,7 +20,7 @@ class faiProfileEntry extends plugin plugin::plugin ($config, $dn); /* Search only in fai tree */ - $base = $_SESSION['faifilter']['base']; + $base = "ou=fai,ou=configs,ou=systems,".$_SESSION['faifilter']['base']; /* Create array with categories to be able to sort different types of objects */ $categories = array("FAIscript","FAItemplate","FAIhook","FAIvariable","FAIpartitionTable","FAIpackage"); @@ -30,6 +30,8 @@ class faiProfileEntry extends plugin $ldap->cd($base); $ldap->search("(| (objectClass=FAIscript)(objectClass=FAItemplate)(objectClass=FAIhook)(objectClass=FAIvariable) (objectClass=FAIpartitionTable)(objectClass=FAIpackage))",array("*")); + + $sort=array(); while($attrs = $ldap->fetch()){ /* Only use objects which have cn set */ @@ -48,7 +50,7 @@ class faiProfileEntry extends plugin } } } - + $tmp = array(); ksort($sort); foreach($sort as $name){ $tmp[$name] =$this->FAIAllclasses[$name];