Code

Added release selector
[gosa.git] / gosa-core / plugins / admin / ogroups / class_ogroup.inc
index d951b0b08e9ae3f92a7a0f001ceb8272efc42933..40f8bc600eb55fca13fe736a481c38df301b5a01 100644 (file)
@@ -85,37 +85,6 @@ class ogroup extends plugin
     }
     $this->is_account= TRUE;
 
-    /* Get global filter config */
-    if (!session::is_set("ogfilter")){
-      $ui= get_userinfo();
-      $base= get_base_from_people($ui->dn);
-      $ogfilter= array( "dselect"       => $base,
-          "regex"           => "*");
-      session::set("ogfilter", $ogfilter);
-    }
-    $ogfilter= session::get('ogfilter');
-
-    /* Adjust flags */
-    foreach( array(   "U" => "accounts",
-          "G" => "groups",
-          "A" => "applications",
-          "D" => "departments",
-          "S" => "servers",
-          "W" => "workstations",
-          "O" => "winstations",
-          "T" => "terminals",
-          "F" => "phones",
-          "_" => "subtrees",
-          "P" => "printers") as $key => $val){
-
-      if (preg_match("/$key/", $this->gosaGroupObjects)){
-        $ogfilter[$val]= "checked";
-      } else {
-        $ogfilter[$val]= "";
-      }
-    }
-    session::set("ogfilter", $ogfilter);
-  
     /* Set base */
     if ($this->dn == "new"){
       $ui = get_userinfo();
@@ -190,12 +159,12 @@ class ogroup extends plugin
 
       /* Add member and force reload */
       $this->member[$NewMember]= $NewMember;
-      $this->reload(); 
 
       $this->memberList[$NewMember]= $this->objcache[$NewMember];
       unset ($this->objects[$NewMember]);
       uasort ($this->memberList, 'sort_list');
       reset ($this->memberList);
+      $this->reload(); 
     }else{
       /* Delete objects from group */
       if (isset($_POST['delete_membership']) && isset($_POST['members'])){
@@ -250,6 +219,7 @@ class ogroup extends plugin
         }
         $this->objectSelect= FALSE;
         $this->dialog= FALSE;
+        $this->reload();
       }
     }
   }
@@ -697,7 +667,7 @@ class ogroup extends plugin
     $conv= array(  
         "Y" => "plugins/users/images/select_template.png",
         "U" => "plugins/generic/images/head.png",
-        "G" => "plugins/groups/images/groups.png",
+        "G" => "plugins/groups/images/select_group.png",
         "A" => "plugins/ogroups/images/application.png",
         "D" => "plugins/departments/images/department.png",
         "S" => "plugins/ogroups/images/server.png",
@@ -814,6 +784,10 @@ class ogroup extends plugin
       $message[]= msgPool::required(_("Name"));
     }
 
+    if (preg_match('/[=,+<>#;]/', $this->cn)) { 
+      $message[] = msgPool::invalid(_("Name"), $this->cn, "/[^=+,<>#;]/"); 
+    } 
+
     /* To many different object types? */
     if (strlen($this->gosaGroupObjects) > 4){
       $message[]= _("You can combine two different object types at maximum, only!");