From 401c7037a96a668d223f0fc52d3584c5fc8206c6 Mon Sep 17 00:00:00 2001 From: hickert Date: Wed, 10 Mar 2010 08:10:58 +0000 Subject: [PATCH] Added comments to the filter dialog git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@16363 594d385d-05f5-0310-b6e9-bd551577e9d8 --- gosa-core/include/class_filterEditorEntry.inc | 33 +++++++++++++++++-- 1 file changed, 31 insertions(+), 2 deletions(-) diff --git a/gosa-core/include/class_filterEditorEntry.inc b/gosa-core/include/class_filterEditorEntry.inc index dce7cdebf..e1ca3012f 100644 --- a/gosa-core/include/class_filterEditorEntry.inc +++ b/gosa-core/include/class_filterEditorEntry.inc @@ -2,16 +2,25 @@ class filterEditEntry extends plugin { + // The original entry else array(), allows us to perform existence checks. public $entry = array(); + + // The values public $name = ""; public $description = ""; public $selectedCategories = array(); public $share = FALSE; public $filter = "(objectClass=*)"; + // The list of all categories mangaged by the current filter object. + // Used in the grop-down box. public $availableCategories = array(); public $orig_name = ""; + + /*! \brief Instantiate the filter editing dialog. + * Parses the filter info into editable data. + */ function __construct($entry, $categories) { $this->availableCategories = $categories; @@ -19,24 +28,36 @@ class filterEditEntry extends plugin $this->entry = $entry; $this->name = $entry['name']; $this->description = $entry['description']; - $this->selectedCategories = $entry['categories']; $this->filter = $entry['filter']; + $this->selectedCategories = $entry['categories']; $this->share = in_array("share",$entry['flags']); } - $this->orig_name = $this->name; } + + /*! \brief Retunrs the filters original name + * @param The original name of the filter (if none was given + * an empty string is returned) + */ function getOriginalName() { return($this->orig_name); } + + /*! \brief Retunrs the filters name. + * @param The name of the filter + */ function getCurrentName() { return($this->name); } + + /*! \brief Generates the content, to edit the filter settings. + * @return String HTML form. + */ function execute() { plugin::execute(); @@ -50,6 +71,9 @@ class filterEditEntry extends plugin return($smarty->fetch(get_template_path('filterEditorEntry.tpl', FALSE))); } + + /*! \brief Keep values entered in the input form of the dialog. (POST/GET) + */ function save_object() { if(isset($_POST['filterEditorEntry'])){ @@ -82,6 +106,11 @@ class filterEditEntry extends plugin } } + + /*! \brief Transforms the entered values into a filter object (array) which is useable + * for the filterEditor overview dialog. + * @return Returns transformed filter data. + */ function save() { $ret= array(); -- 2.30.2