summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 7982147)
raw | patch | inline | side by side (parent: 7982147)
author | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 May 2010 09:41:54 +0000 (09:41 +0000) | ||
committer | hickert <hickert@594d385d-05f5-0310-b6e9-bd551577e9d8> | |
Thu, 6 May 2010 09:41:54 +0000 (09:41 +0000) |
git-svn-id: https://oss.gonicus.de/repositories/gosa/trunk@18158 594d385d-05f5-0310-b6e9-bd551577e9d8
gosa-core/include/class_config.inc | patch | blob | history |
index b6e0c270cd4cea9709b41dd1ed763e1b06c8017c..97514654d372a546a852dd4081edcecca917bf76 100644 (file)
}
- /*! \brief Check if there's the specified bool value set in the configuration
+ /*! \brief Checks if there's a bool property set in the configuration.
*
* The function checks, weither the specified bool value is set to a true
- * value in the configuration file. Considered true are either true or yes,
- * case-insensitive.
+ * value in the configuration file.
*
* Example usage:
* \code
- * if ($this->config->boolValueIsTrue("main", "copyPaste")) {
+ * if ($this->config->boolValueIsTrue("core", "copyPaste")) {
* echo "Copy Paste Handling is enabled";
* }
* \endcode
*
- * \param string 'section' Section in the configuration file.
+ * \param string 'class' The properties class. e.g. 'core','user','sudo',...
* \param string 'value' Key in the given section, which is subject to check
*
*
* */
- function boolValueIsTrue($section, $value)
+ function boolValueIsTrue($class, $value)
{
- $section= strtoupper($section);
- $value= strtoupper($value);
- if (isset($this->data[$section][$value])){
-
- $data= $this->data[$section][$value];
- if (preg_match("/^true$/i", $data) || preg_match("/yes/i", $data)){
- return TRUE;
- }
-
- }
-
- return FALSE;
+ return(preg_match("/true/i", $this->get_cfg_value($class,$name)));
}