Code

Set mode to read_only if we edit frozen apps
[gosa.git] / gosa-plugins / goto / admin / applications / tabs_application.inc
index 53b0916cd180ae348977b179be830d795f65451d..bf7a311f27bc76114d6e7572b4b39ee82ffbf475 100644 (file)
@@ -5,9 +5,9 @@ class apptabs extends tabs
   var $parent   = FALSE;
   var $FAIstate = "";
 
-  function apptabs($config, $data, $dn,$category)
+  function apptabs($config, $data, $dn,$category,$hide_refs = FALSE, $hide_acls = FALSE)
   {
-    tabs::tabs($config, $data, $dn,$category);
+    tabs::tabs($config, $data, $dn,$category,$hide_refs, $hide_acls);
 
     /* Add references/acls/snapshots */
     $this->addSpecialTabs();
@@ -27,22 +27,18 @@ class apptabs extends tabs
 
     /* Check for new 'dn', in order to propagate the
        'dn' to all plugins */
-    if($this->parent->IsReleaseManagementActivated()){
-      $new_dn= "cn=".$baseobject->cn.",".$this->parent->app_release;
+    if($baseobject->parent->parent->IsReleaseManagementActivated()){
+      $new_dn= "cn=".$baseobject->cn.",".$baseobject->parent->parent->app_release;
     }else{
-      $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationou').$baseobject->base;
+      $new_dn= "cn=".$baseobject->cn.",".get_ou('applicationRDN').$baseobject->base;
     }
-
-    /* Move group? */
+    
+    // Do we have to move the object?
     if ($this->dn != $new_dn){
-
-      /* Write entry on new 'dn' */
       if ($this->dn != "new"){
         $baseobject->move($this->dn, $new_dn);
         $this->by_object['application']= $baseobject;
       }
-
-      /* Happen to use the new one */
       $this->dn= $new_dn;
     }