summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 4b45577)
raw | patch | inline | side by side (parent: 4b45577)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 22 Nov 2006 12:26:46 +0000 (12:26 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Wed, 22 Nov 2006 12:26:46 +0000 (12:26 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@5193 594d385d-05f5-0310-b6e9-bd551577e9d8
plugins/admin/mimetypes/class_divListMimeTypes.inc | patch | blob | history | |
plugins/admin/mimetypes/class_mimetypeGeneric.inc | patch | blob | history |
diff --git a/plugins/admin/mimetypes/class_divListMimeTypes.inc b/plugins/admin/mimetypes/class_divListMimeTypes.inc
index 3c3a44073f6065accf932a69c003d1e9919e37ae..a491e73c8f80d74ef0c4ce7afb3ba94081c43ae3 100755 (executable)
}
/* Get copy Paste icons */
- if($this->parent->CopyPasteHandler){
-
- /* Only add cut icon, if we are allowed to move this user */
- if(preg_match("/m/",$acl)){
- $actions.= "<input class='center' type='image'
- src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
- }else{
- $actions.= "<img src='images/empty.png' alt=' '>";
- }
-
- /* Copy is allowed everytime */
+ if(($this->parent->CopyPasteHandler) && preg_match("/(c.*w|w.*c)/",$acl_all)){
+ $actions.= "<input class='center' type='image'
+ src='images/editcut.png' alt='"._("cut")."' name='cut_%KEY%' title='"._("Cut this entry")."'> ";
$actions.= "<input class='center' type='image'
src='images/editcopy.png' alt='"._("copy")."' name='copy_%KEY%' title='"._("Copy this entry")."'> ";
}
- /* Add edit button */
$actions.= "<input class='center' type='image'
src='images/edit.png' alt='"._("edit")."' name='mime_edit_%KEY%' title='"._("Edit this entry")."'>";
diff --git a/plugins/admin/mimetypes/class_mimetypeGeneric.inc b/plugins/admin/mimetypes/class_mimetypeGeneric.inc
index af3c768f625f578158261a9239459962edf41b9d..f4bb14f11d0380202b8102115a764c538ba8221a 100644 (file)
$EApps_Actions= "";
}
- foreach($this->use_gotoMimeFilePattern as $key => $pattern){
- $field1 = array("string" => $pattern);
- $field2 = array("string" => preg_replace("/%s/",$key,$Pattern_Actions),"attach"=>"style='border-right:0px;width:50px;'");
- $fields = array($field1,$field2);
- $DivPatterns -> AddEntry($fields);
+ /* Before adding some entries check acls */
+ if($this->acl_is_readable("gotoMimeFilePattern")){
+ foreach($this->use_gotoMimeFilePattern as $key => $pattern){
+ $field1 = array("string" => $pattern);
+ $field2 = array("string" => preg_replace("/%s/",$key,$Pattern_Actions),"attach"=>"style='border-right:0px;width:50px;'");
+ $fields = array($field1,$field2);
+ $DivPatterns -> AddEntry($fields);
+ }
+ }
+
+ if($this->acl_is_readable("gotoMimeApplication")){
+ foreach($this->use_gotoMimeApplication as $key => $pattern){
+ $field1 = array("string" => $pattern);
+ $field2 = array("string" => preg_replace("/%s/",$key,$Apps_Actions),"attach"=>"style='border-right:0px;width:50px;'");
+ $fields = array($field1,$field2);
+ $DivApps -> AddEntry($fields);
+ }
}
- foreach($this->use_gotoMimeApplication as $key => $pattern){
- $field1 = array("string" => $pattern);
- $field2 = array("string" => preg_replace("/%s/",$key,$Apps_Actions),"attach"=>"style='border-right:0px;width:50px;'");
- $fields = array($field1,$field2);
- $DivApps -> AddEntry($fields);
+ if($this->acl_is_readable("gotoMimeEmbeddedApplication")){
+ foreach($this->use_gotoMimeEmbeddedApplication as $key => $pattern){
+ $field1 = array("string" => $pattern);
+ $field2 = array("string" => preg_replace("/%s/",$key,$EApps_Actions),"attach"=>"style='border-right:0px;width:50px;'");
+ $fields = array($field1,$field2);
+ $DivEApps -> AddEntry($fields);
+ }
}
- foreach($this->use_gotoMimeEmbeddedApplication as $key => $pattern){
- $field1 = array("string" => $pattern);
- $field2 = array("string" => preg_replace("/%s/",$key,$EApps_Actions),"attach"=>"style='border-right:0px;width:50px;'");
- $fields = array($field1,$field2);
- $DivEApps -> AddEntry($fields);
- }
$smarty->assign("bases", $this->get_allowed_bases());
$smarty->assign("base_select", $this->base);
$smarty->assign("isReleaseMimeType", $this->isReleaseMimeType);