X-Git-Url: https://git.tokkee.org/?a=blobdiff_plain;f=include%2Fsmarty%2FConfig_File.class.php;h=622c0e8a021abede358101b641507d52f695dc7f;hb=e01f7be38eb35478f1f4321edac33986743a05e1;hp=b5fdd22694311760c32c73b94786b93982544772;hpb=c2c6a6e54355a1b67c25bb4d761d847513810d02;p=gosa.git diff --git a/include/smarty/Config_File.class.php b/include/smarty/Config_File.class.php index b5fdd2269..622c0e8a0 100644 --- a/include/smarty/Config_File.class.php +++ b/include/smarty/Config_File.class.php @@ -18,14 +18,14 @@ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * * @link http://smarty.php.net/ - * @version 2.6.9 + * @version 2.6.14 * @copyright Copyright: 2001-2005 New Digital Group, Inc. * @author Andrei Zmievski * @access public * @package Smarty */ -/* $Id: Config_File.class.php,v 1.78 2005/03/22 08:45:06 messju Exp $ */ +/* $Id: Config_File.class.php,v 1.84 2006/01/18 19:02:52 mohrt Exp $ */ /** * Config file reading class @@ -105,7 +105,7 @@ class Config_File { * @param string $var_name (optional) variable to get info for * @return string|array a value or array of values */ - function &get($file_name, $section_name = NULL, $var_name = NULL) + function get($file_name, $section_name = NULL, $var_name = NULL) { if (empty($file_name)) { $this->_trigger_error_msg('Empty config file name'); @@ -285,9 +285,9 @@ class Config_File { $line = $lines[$i]; if (empty($line)) continue; - if ( $line{0} == '[' && preg_match('!^\[(.*?)\]!', $line, $match) ) { + if ( substr($line, 0, 1) == '[' && preg_match('!^\[(.*?)\]!', $line, $match) ) { /* section found */ - if ($match[1]{0} == '.') { + if (substr($match[1], 0, 1) == '.') { /* hidden section */ if ($this->read_hidden) { $section_name = substr($match[1], 1); @@ -347,7 +347,7 @@ class Config_File { */ function _set_config_var(&$container, $var_name, $var_value, $booleanize) { - if ($var_name{0} == '.') { + if (substr($var_name, 0, 1) == '.') { if (!$this->read_hidden) return; else