Code

udapted mime port
authorhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Jul 2007 11:15:58 +0000 (11:15 +0000)
committerhickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8>
Tue, 3 Jul 2007 11:15:58 +0000 (11:15 +0000)
git-svn-id: https://oss.gonicus.de/repositories/gosa/branches/2.5@6752 594d385d-05f5-0310-b6e9-bd551577e9d8

plugins/admin/mimetypes/class_divListMimeTypes.inc
plugins/admin/mimetypes/class_mimetypeGeneric.inc
plugins/admin/mimetypes/class_mimetypeManagement.inc

index dc4b36ec166d0477c2f1feace46f46935a095d2c..6adc6a9e649150cc23daca4510d63bbbade9e67f 100755 (executable)
@@ -52,7 +52,6 @@ class divListMimeTypes extends MultiSelectWindow
                onClick='toggle_all_(\"^item_selected_[0-9]*$\",\"select_all\");' >";
 
     /* set Page header */
-    $this->AddHeader(array("string"=> $chk,          "attach"=>"style='width:20px;'"));
     $this->AddHeader(array("string" => "&nbsp;",                "attach" => "style='text-align:center;width:20px;'"));
     $this->AddHeader(array("string" => _("Mime type name")." / "._("Department"), "attach" => "style=''"));
     $this->AddHeader(array("string" => _("Actions"),            "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'"));
@@ -158,13 +157,10 @@ class divListMimeTypes extends MultiSelectWindow
         $desc = " - [ ".$val['description'][0]." ]";
       }
 
-      /* Create each field */
-      $field0 = array("string" => "<input type='checkbox' id='item_selected_".$key."' name='item_selected_".$key."'>" ,
-                      "attach" => "style='width:20px;'");
       $field1 = array("string" => sprintf($mimeimg,$val['dn']), "attach" => "style='text-align:center;width:20px;'");
       $field2 = array("string" => sprintf($editlink,$key,($val['cn']['0'].$desc)), "attach" => "style='' ".$title);
       $field3 = array("string" => preg_replace("/%KEY%/", $key, $actions), "attach" => "style='width:".$action_col_size."px;border-right:0px;text-align:right;'");
-      $this->AddElement(array($field0,$field1,$field2,$field3));
+      $this->AddElement(array($field1,$field2,$field3));
     }
   }
 
index 6efbb480b57285d2140c39e2410af269b0f26b76..7a803015abcf3a00050e65078a5598fafaf8ea18 100644 (file)
@@ -65,9 +65,7 @@ class mimetype extends plugin
     $this->orig_dn = $dn;      
 
     $this->ui = get_userinfo();
-    $acl= get_permissions ($dn, $this->ui->subtreeACL);
-    $this->acl= get_module_permission($acl, "mimetypes", $dn);
-
     /* get gotoMimeLeftClickActions I/E/Q */
     if(isset($this->gotoMimeLeftClickAction)){
       $str = $this->gotoMimeLeftClickAction;
index 0dd9bff7659c297b4650f2841abe520ca7801422..f4bf712fc7631ecff50b463bd1440cb554e59a6c 100755 (executable)
@@ -173,6 +173,10 @@ class mimetypeManagement extends plugin
 
       /* Create new usertab object */
       $this->mimetabs= new mimetabs($this->config, $this->config->data['TABS']['MIMETABS'], $this->dn);
+
+      /* Set up the users ACL's for this 'dn' */
+      $acl= get_permissions ($this->DivListMimeTypes->selectedBase, $this->ui->subtreeACL);
+      $this->mimetabs->set_acl($acl);
     }   
 
 
@@ -248,6 +252,11 @@ class mimetypeManagement extends plugin
 
       /* Register mimetabs to trigger edit dialog */
       $this->mimetabs= new mimetabs($this->config,$this->config->data['TABS']['MIMETABS'], $this->dn);
+
+      /* Set up the users ACL's for this 'dn' */
+      $acl= get_permissions ($this->DivListMimeTypes->selectedBase, $this->ui->subtreeACL);
+      $this->mimetabs->set_acl($acl);
+
       $_SESSION['objectinfo']= $this->dn;
     }
 
@@ -448,7 +457,7 @@ class mimetypeManagement extends plugin
     }
   
     /* Get results and create index */ 
-    $res= get_list($Filter, "mimetypes", $use_base, array("cn","description","dn","objectClass"), $Flags);
+    $res= get_list($Filter, $this->ui->subtreeACL, $use_base, array("cn","description","dn","objectClass"), $Flags);
     foreach ($res as $val){
       $tmp[strtolower($val['cn'][0]).$val['cn'][0].$val['dn']]=$val;
     }