Code

* Updated locale
[gosa.git] / gosa-core / plugins / admin / ogroups / class_ogroupManagement.inc
index 77e5c65344a4fb20816ef9dbeddf700304150c76..634d863c9d3fb7e2e7d8d488c62901703b37b32e 100644 (file)
@@ -246,7 +246,7 @@ class ogroupManagement extends plugin
 
           $dns_names = array();
           foreach($this->dns as $dn){
-            $dns_names[] = @LDAP::fix($dn);
+            $dns_names[] = LDAP::fix($dn);
           }
 
           add_lock ($this->dns, $this->ui->dn);
@@ -328,7 +328,7 @@ class ogroupManagement extends plugin
 
         /* Lock the current entry, so nobody will edit it during deletion */
         add_lock ($this->dn, $this->ui->dn);
-        $smarty->assign("info", msgPool::deleteInfo(@LDAP::fix($this->dn),_("object group")));
+        $smarty->assign("info", msgPool::deleteInfo(LDAP::fix($this->dn),_("object group")));
         $smarty->assign("multiple", false);
         return($smarty->fetch(get_template_path('remove.tpl', TRUE)));
       } else {
@@ -395,7 +395,7 @@ class ogroupManagement extends plugin
       /* Check locking, save current plugin in 'back_plugin', so
          the dialog knows where to return. */
       if (($user= get_lock($this->dn)) != ""){
-        return(gen_locked_message ($user, $this->dn));
+        return(gen_locked_message ($user, $this->dn,TRUE));
       }
 
       /* Lock the current entry, so everyone will get the
@@ -471,7 +471,11 @@ class ogroupManagement extends plugin
       $display= $this->ogroup->execute();
 
       /* Don't show buttons if tab dialog requests this */
-      if (!$this->ogroup->by_object[$this->ogroup->current]->dialog){
+      if(($this->ogroup instanceOf tabs || $this->ogroup instanceOf plugin) && $this->ogroup->read_only == TRUE){
+        $display.= "<p style=\"text-align:right\">
+          <input type=submit name=\"edit_cancel\" value=\"".msgPool::cancelButton()."\">
+          </p>";
+      }elseif (!$this->ogroup->by_object[$this->ogroup->current]->dialog){
         $display.= "<p style=\"text-align:right\">\n";
         $display.= "<input type=submit name=\"edit_finish\" style=\"width:80px\" value=\"".msgPool::okButton()."\">\n";
         $display.= "&nbsp;\n";
@@ -513,7 +517,7 @@ class ogroupManagement extends plugin
   /* Return departments, that will be included within snapshot detection */
   function get_used_snapshot_bases()
   {
-    return(array(get_ou('ogroupou').$this->DivListOGroup->selectedBase));
+    return(array(get_ou('ogroupRDN').$this->DivListOGroup->selectedBase));
   }
 
   
@@ -601,9 +605,9 @@ class ogroupManagement extends plugin
     $filter= "(&(cn=$Regex)(objectClass=gosaGroupOfNames)(|$filter))";
 
     if($this->DivListOGroup->SubSearch){
-      $res= get_sub_list($filter, "ogroups",get_ou('ogroupou'), $base, array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT | GL_SUBSEARCH);
+      $res= get_sub_list($filter, "ogroups",get_ou('ogroupRDN'), $base, array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT | GL_SUBSEARCH);
     }else{
-      $res= get_sub_list($filter, "ogroups",get_ou('ogroupou'), get_ou('ogroupou').$base, array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT );
+      $res= get_sub_list($filter, "ogroups",get_ou('ogroupRDN'), get_ou('ogroupRDN').$base, array("cn","objectClass","gosaGroupObjects"), GL_SIZELIMIT );
     }
 
     $this->ogrouplist= $res;
@@ -709,8 +713,7 @@ class ogroupManagement extends plugin
   {
     if (isset($this->apptabs->dn)){
       del_lock ($this->apptabs->dn);
-    }
-    if(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
+    }elseif(isset($this->dn) && !empty($this->dn) && $this->dn != "new"){
       del_lock($this->dn);
     }
     if(isset($this->dns) && is_array($this->dns) && count($this->dns)){