From: hickert Date: Mon, 7 Apr 2008 07:20:53 +0000 (+0000) Subject: Updated sudo classes X-Git-Url: https://git.tokkee.org/?a=commitdiff_plain;h=859917ca32de8686a78b02aaef4653f821141323;p=gosa.git Updated sudo classes -Added comments. git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@10218 594d385d-05f5-0310-b6e9-bd551577e9d8 --- diff --git a/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc b/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc index d13d554e0..8e90e6b56 100644 --- a/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc +++ b/gosa-plugins/sudo/admin/sudo/class_divListSudo.inc @@ -20,6 +20,10 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/*! \brief The sudo management class. + This class lists all configured sudo roles. + */ class divListSudo extends MultiSelectWindow { @@ -37,6 +41,11 @@ class divListSudo extends MultiSelectWindow var $parent ; var $ui ; + + /*! \brief Initialize this class + @param Object $config The GOsa configuration object. + @param Object $parent The parent class. + */ function divListSudo (&$config, &$parent) { MultiSelectWindow::MultiSelectWindow($config, "sudo", "sudo"); @@ -78,6 +87,8 @@ class divListSudo extends MultiSelectWindow } + /*! \brief Generate the list header. + */ function GenHeader() { /* Prepare departments, @@ -111,6 +122,8 @@ class divListSudo extends MultiSelectWindow } + /*! \brief Prepare the plguin to list a set of objects + */ function execute() { $this->ClearElementsList(); @@ -118,6 +131,9 @@ class divListSudo extends MultiSelectWindow } + /*! \brief Create a list of all objects that should be displayed + @param Array $list The list of sudo roles, passed from the sudoManagement class. + */ function setEntries($list) { /* Prepare links */ @@ -172,11 +188,16 @@ class divListSudo extends MultiSelectWindow $this->set_List_Bottom_Info($str); } + + /*! \brief Save this plugin. In this case nothing will be saved + */ function Save() { MultiSelectWindow :: Save(); } + /*! \brief Save all relevant HTML inputs for this plugin. + */ function save_object() { /* Save automatic created POSTs like regex, checkboxes */ diff --git a/gosa-plugins/sudo/admin/sudo/class_sudoOption.inc b/gosa-plugins/sudo/admin/sudo/class_sudoOption.inc index eb2cd1e80..6b12f8130 100644 --- a/gosa-plugins/sudo/admin/sudo/class_sudoOption.inc +++ b/gosa-plugins/sudo/admin/sudo/class_sudoOption.inc @@ -20,16 +20,22 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + +/*! \brief Sudo option class. + Allows setting flags/options for a sudo role. + */ class sudoOption extends plugin { /* Group attributes */ var $sudoOption = array(); - var $attributes = array("sudoOption"); var $is_account = TRUE; - var $options = array(); + /*! \brief Initializes this class + @param Object $config The GOsa configuration object. + @param String $dn The object dn. + */ function sudoOption(&$config, $dn= NULL) { plugin::plugin ($config, $dn); @@ -174,6 +180,10 @@ class sudoOption extends plugin } } + + /*! \brief Create HTML output for this plugin + @return String HTML output for this plugin. + */ function execute() { /* Call parent execute */ @@ -259,11 +269,16 @@ class sudoOption extends plugin return($smarty->fetch(get_template_path('options.tpl', TRUE))); } + + /*! \brief Removes this plugin + */ function remove_from_parent() { } - /* Save data to object */ + + /*! \brief Saves all relevant HTML post values for this plugin + */ function save_object() { plugin::save_object(); @@ -336,7 +351,9 @@ class sudoOption extends plugin } } - /* Save to LDAP */ + + /*! \brief Save changes to ldap + */ function save() { plugin::save(); @@ -417,6 +434,9 @@ class sudoOption extends plugin $ldap->modify($this->attrs);; } + + /*! \brief Checks input validity + */ function check() { $message = plugin::check();