summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 220d15c)
raw | patch | inline | side by side (parent: 220d15c)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 8 Apr 2008 08:14:50 +0000 (08:14 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Tue, 8 Apr 2008 08:14:50 +0000 (08:14 +0000) |
-Fixed problem with entries containing ' or "
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10272 594d385d-05f5-0310-b6e9-bd551577e9d8
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10272 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc | patch | blob | history | |
gosa-plugins/sudo/admin/sudo/class_sudoOption.inc | patch | blob | history |
diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc b/gosa-plugins/sudo/admin/sudo/class_sudoGeneric.inc
index 0544cf64d8223392a86a218b44192937efdb96df..969598d9b35feb62561627820f02ab9906873e3f 100644 (file)
}
+ /*! \brief Force this entry to be handled and saved as 'default'
+ @param BOOL TRUE -force default FALSE -normal
+ */
public function set_default($state)
{
$this->is_default = TRUE;
diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoOption.inc b/gosa-plugins/sudo/admin/sudo/class_sudoOption.inc
index 1280268aa0d8548e56e5c37ca369a30732667423..48d862f6a5ac7e8051c9db48a36748d49d3a2553 100644 (file)
$smarty->assign("map", array("STRING" => _("string"), "BOOLEAN" => _("bool"),
"INTEGER" => _("integer") , "BOOL_INTEGER" => _("integer")."-"._("bool") ,
"STRING_BOOL" => _("string")."-"._("bool"),"LISTS" => _("list")));
- $smarty->assign("sudoOption",$this->sudoOption);
+ $smarty->assign("sudoOption",$this->prepare_for_html($this->sudoOption));
$smarty->assign("options",$this->options);
return($smarty->fetch(get_template_path('options.tpl', TRUE)));
}
+ /*! \brief Prepare options array to be used in HTML.
+ @param Array The options array ($this->sudoOption)
+ @return Array HTML ready sudoOption. Can now be used in smarty templates
+ */
+ function prepare_for_html($a_options)
+ {
+ foreach($a_options as $name => $options){
+ foreach($options as $key => $option){
+ $a_options[$name][$key]['VALUE'] = htmlentities($option['VALUE']);
+ }
+ }
+ return($a_options);
+ }
+
+
/*! \brief Removes this plugin
*/
function remove_from_parent()