cvs: smarty / NEWS /libs Config_File.class.php
| From: | Monte Ohrt | Date: | Fri, 06 Jun 2003 13:52:21 +0000 |
| Subject: | cvs: smarty / NEWS /libs Config_File.class.php | ||
| Groups: | php.smarty.cvs | ||
| Request: | Send a blank email to php-smarty-cvs+get-626@lists.php.net to get a copy of this message | ||
mohrt Fri Jun 6 09:52:21 2003 EDT
Modified files:
/smarty NEWS
/smarty/libs Config_File.class.php
Log:
fix bug where config file starts with hidden section
Index: smarty/NEWS
diff -u smarty/NEWS:1.368 smarty/NEWS:1.369
--- smarty/NEWS:1.368 Wed Jun 4 09:50:50 2003
+++ smarty/NEWS Fri Jun 6 09:52:21 2003
@@ -1,3 +1,4 @@
+ - fix bug where config file starts with hidden section (boots, Monte)
- add discrete error checking pertaining to $cache_dir
and $compile_dir, their existance and writability (Monte)
- fixed behaviour of start=... for {counter} (messju)
Index: smarty/libs/Config_File.class.php
diff -u smarty/libs/Config_File.class.php:1.48 smarty/libs/Config_File.class.php:1.49
--- smarty/libs/Config_File.class.php:1.48 Thu May 8 10:29:44 2003
+++ smarty/libs/Config_File.class.php Fri Jun 6 09:52:21 2003
@@ -37,7 +37,7 @@
* @package Smarty
*/
-/* $Id: Config_File.class.php,v 1.48 2003/05/08 14:29:44 mohrt Exp $ */
+/* $Id: Config_File.class.php,v 1.49 2003/06/06 13:52:21 mohrt Exp $ */
/**
* Config file reading class
* @package Smarty
@@ -262,7 +262,7 @@
$config_data = array();
/* Get global variables first. */
- if (preg_match("/^(.*?)(\n\[|\Z)/s", $contents, $match))
+ if ($contents{0} != '[' && preg_match("/^(.*?)(\n\[|\Z)/s",
$contents, $match))
$config_data["vars"] = $this->_parse_config_block($match[1]);
/* Get section variables. */