Code

Updated get_ou it receives values from the config registry now.
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 May 2010 13:32:45 +0000 (13:32 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Mon, 10 May 2010 13:32:45 +0000 (13:32 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18266 594d385d-05f5-0310-b6e9-bd551577e9d8

gosa-plugins/goto/admin/applications/class_applicationGeneric.inc
gosa-plugins/goto/admin/applications/class_applicationManagement.inc
gosa-plugins/goto/admin/applications/tabs_application.inc

index bf11b1f7aba247fc43dd11fe70a9124912a42532..0b077299dea5b8f3c270add9295f581563017874 100644 (file)
@@ -59,7 +59,7 @@ class application extends plugin
         $this->base= dn2base($ui->dn);
       }
     } else {
-      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou('applicationRDN'), '/')."/i", "", $this->dn);
+      $this->base= preg_replace ("/^[^,]+,".preg_quote(get_ou("application", "applicationRDN") , '/')."/i", "", $this->dn);
     }
 
     $this->orig_cn = $this->cn;
@@ -209,7 +209,7 @@ class application extends plugin
   function remove_from_parent()
   {
     /* Parse release out of object dn */
-    $release = preg_replace("/".preg_quote(get_ou("applicationRDN").$this->base, '/')."$/i","",$this->dn);
+    $release = preg_replace("/".preg_quote(get_ou("application", "applicationRDN") .$this->base, '/')."$/i","",$this->dn);
     $release = preg_replace("/^cn=[^,]+,/","",$release);
 
     /* Get a list of all groups 
@@ -404,7 +404,7 @@ class application extends plugin
 
     /* Permissions for that base? */
     if ($this->base != ""){
-      $new_dn= "cn=".$this->cn.",".get_ou('applicationRDN').$this->base;
+      $new_dn= "cn=".$this->cn.",".get_ou("application", "applicationRDN") .$this->base;
     } else {
       $new_dn= $this->dn;
     }
@@ -433,7 +433,7 @@ class application extends plugin
     if($this->is_release()){
       $base = $this->parent->parent->app_release;
     }else{
-      $base = get_ou('applicationRDN').$this->base;
+      $base = get_ou("application", "applicationRDN") .$this->base;
     }
 
     $ldap->ls("(&(objectClass=gosaApplication)(cn=".$this->cn."))",$base,array("cn"));
index 3cd74a415ee67d604dae69a7711c92027591ab19..10530fcda11d76201ca93e7f78d5c5cb0d8ec6c8 100644 (file)
@@ -42,8 +42,8 @@ class applicationManagement extends management
   {
     $this->config = $config;
     $this->ui = $ui;
-    $this->app_base    = get_ou('applicationRDN').$this->config->current['BASE'];
-    $this->app_release = get_ou('applicationRDN').$this->config->current['BASE'];
+    $this->app_base    = get_ou("application", "applicationRDN") .$this->config->current['BASE'];
+    $this->app_release = get_ou("application", "applicationRDN") .$this->config->current['BASE'];
 
     if($this->IsReleaseManagementActivated()){
       $filter_xml = "application-filter-release.xml";
@@ -54,7 +54,7 @@ class applicationManagement extends management
     }else{
       $filter_xml = "application-filter.xml";
       $list_xml = "application-list.xml";
-      $this->storagePoints= array(get_ou("applicationRDN"));
+      $this->storagePoints= array(get_ou("application", "applicationRDN") );
     }
 
     // Build filter
index bf7a311f27bc76114d6e7572b4b39ee82ffbf475..8b96459f3676fd05369c61d966fb3eaec9c6801c 100644 (file)
@@ -30,7 +30,7 @@ class apptabs extends tabs
     if($baseobject->parent->parent->IsReleaseManagementActivated()){
       $new_dn= "cn=".$baseobject->cn.",".$baseobject->parent->parent->app_release;
     }else{
-      $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationRDN').$baseobject->base;
+      $new_dn= "cn=".$baseobject->cn.",".get_ou("application", "applicationRDN") .$baseobject->base;
     }
     
     // Do we have to move the object?