Code

git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@576 594d385d-05f5-0310...
[gosa.git] / plugins / admin / applications / class_applicationGeneric.inc
index 4330a54e09bacfb89459e56a5c09215a966d2a23..27cf79eb1084ccbf5b2b05857364cfb76b732f73 100644 (file)
@@ -31,7 +31,9 @@ class application extends plugin
 
        /* Load icon */
        $ldap= $config->get_ldap_link();
-       $this->iconData= $ldap->get_attribute($dn, "gosaApplicationIcon");
+       if ($dn != 'new'){
+               $this->iconData= $ldap->get_attribute($dn, "gosaApplicationIcon");
+       }
        if ($this->iconData == ""){
                $this->set_picture("");
        }
@@ -41,12 +43,12 @@ class application extends plugin
        /* This is always an account */
        $this->is_account= TRUE;
 
-        if ($this->dn == "new"){
+       if ($this->dn == "new"){
                $ui= get_userinfo();
                $this->base= dn2base($ui->dn);
        } else {
-                $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
-        }
+               $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
+       }
   }
 
   function execute()