Code

refresh sip table if phone settings changed
[gosa.git] / plugins / admin / ogroups / class_ogroup.inc
index fcf55b33988aa9e186a5a97e7cc852c2fec42780..86c96ae95abf749cd163644350b7e4dee8b98b4a 100644 (file)
@@ -78,6 +78,10 @@ class ogroup extends plugin
       }
     }
     register_global("ogfilter", $ogfilter);
+  
+    if(isset($_SESSION['ogroupfilter']['depselect'])){
+     $this->base = $_SESSION['ogroupfilter']['depselect'];
+    }
 
     /* Load member data */
     $this->reload();
@@ -87,7 +91,7 @@ class ogroup extends plugin
   {
     /* Do we represent a valid group? */
     if (!$this->is_account){
-      $display= "<img src=\"images/stop.png\" align=center>&nbsp;<b>".
+      $display= "<img alt=\"\" src=\"images/stop.png\" align=\"middle\">&nbsp;<b>".
         _("This 'dn' is no object group.")."</b>";
       return ($display);
     }
@@ -180,22 +184,17 @@ class ogroup extends plugin
         $smarty->assign("$type", $ogfilter[$type]);
       }
       $smarty->assign("hint", print_sizelimit_warning());
+      $smarty->assign("apply", apply_filter());
 
       $display= $smarty->fetch (get_template_path('ogroup_objects.tpl', TRUE, dirname(__FILE__)));
       return ($display);
     }
 
     /* Bases / Departments */
-    if ($this->dn == "new"){
-      $ui= get_userinfo();
-      $this->base= dn2base($ui->dn);
-    } else {
+   
       if (isset($_POST['base'])){
         $this->base= $_POST['base'];
-      } else {
-        $this->base= preg_replace ("/^[^,]+,[^,]+,/", "", $this->dn);
       }
-    }
 
     /* Assemble combine string */
     if ($this->gosaGroupObjects == "[]"){
@@ -240,6 +239,11 @@ class ogroup extends plugin
       $smarty->assign("$val"."ACL", chkacl($this->acl, "$val"));
     }
 
+    /* Assign ACL's */
+    foreach (array("base", "members") as $val){
+      $smarty->assign("$val"."ACL", chkacl($this->acl, "$val"));
+    }
+
     return ($smarty->fetch (get_template_path('generic.tpl', TRUE)));
   }
 
@@ -340,6 +344,10 @@ class ogroup extends plugin
       } else {
         $this->allobjects[$attrs["dn"]]= array("text" => "$name", "type" => "$type");
       }
+      $this->allobjects[$attrs["dn"]]['objectClass']  = $attrs['objectClass'];
+      if(isset($attrs['uid'])){
+        $this->allobjects[$attrs["dn"]]['uid']          = $attrs['uid'];
+      }
     }
     uasort ($this->allobjects, 'sort_list');
     reset ($this->allobjects);