From f57ca1fa8918675c09020969f7c409f079523b18 Mon Sep 17 00:00:00 2001 From: hickert Date: Mon, 21 Jul 2008 08:09:46 +0000 Subject: [PATCH] Updated Mimetypes -Fixed ACL check git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@11721 594d385d-05f5-0310-b6e9-bd551577e9d8 --- .../goto/admin/mimetypes/class_mimetypeGeneric.inc | 4 +++- gosa-plugins/goto/admin/mimetypes/generic.tpl | 7 ++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc index 0e51158e6..9246366da 100644 --- a/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc +++ b/gosa-plugins/goto/admin/mimetypes/class_mimetypeGeneric.inc @@ -160,6 +160,7 @@ class mimetype extends plugin foreach($tmp['plProvidedAcls'] as $name => $translation){ $smarty->assign($name."ACL",$this->getacl($name,preg_match("/freeze/i",$this->FAIstate))); } + $smarty->assign("IconReadable", preg_match("/r/",$this->getacl("gotoMimeIcon",preg_match("/freeze/i",$this->FAIstate)))); /* Base select dialog */ $once = true; @@ -220,6 +221,7 @@ class mimetype extends plugin /* Get action vars */ $func = $action['Func']; // Get function name $attr = $action['Attr']; // Get attribute name + $acl_a = preg_replace("/^use_/","",$action['Attr']); // Get attribute name /* Get entry id */ $s_entry = preg_replace($regex,"",$name); @@ -227,7 +229,7 @@ class mimetype extends plugin /* Execute a command with the given attribute and entry e.g. $this->gotoMimeFilePattern = $this->ArrayUp(3,$this->gotoMimeFilePattern) */ - if($this->acl_is_writeable($attr)){ + if($this->acl_is_writeable($acl_a)){ $this->$attr= $this->$func($s_entry,$this->$attr,true); } } diff --git a/gosa-plugins/goto/admin/mimetypes/generic.tpl b/gosa-plugins/goto/admin/mimetypes/generic.tpl index b66f24292..e436117d4 100644 --- a/gosa-plugins/goto/admin/mimetypes/generic.tpl +++ b/gosa-plugins/goto/admin/mimetypes/generic.tpl @@ -12,7 +12,7 @@ {t}Mime type{/t}{$must} -{render acl=$gotoMimeGroupACL} +{render acl=$cnACL} {/render} @@ -65,8 +65,13 @@
+{if $IconReadable} {t}Mime icon{/t} +{else} + {t}Mime icon{/t} +{/if}  
-- 2.30.2