index b5fdd22694311760c32c73b94786b93982544772..622c0e8a021abede358101b641507d52f695dc7f 100644 (file)
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* @link http://smarty.php.net/
* 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 <andrei@php.net>
* @access public
* @package Smarty
*/
* @copyright Copyright: 2001-2005 New Digital Group, Inc.
* @author Andrei Zmievski <andrei@php.net>
* @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
/**
* Config file reading class
* @param string $var_name (optional) variable to get info for
* @return string|array a value or array of values
*/
* @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');
{
if (empty($file_name)) {
$this->_trigger_error_msg('Empty config file name');
$line = $lines[$i];
if (empty($line)) continue;
$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 */
/* section found */
- if ($match[1]{0} == '.') {
+ if (substr($match[1], 0, 1) == '.') {
/* hidden section */
if ($this->read_hidden) {
$section_name = substr($match[1], 1);
/* hidden section */
if ($this->read_hidden) {
$section_name = substr($match[1], 1);
*/
function _set_config_var(&$container, $var_name, $var_value, $booleanize)
{
*/
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
if (!$this->read_hidden)
return;
else