From d1dc65328cfef8cccbb2fd83c98c4716e402dbe7 Mon Sep 17 00:00:00 2001 From: chris Date: Sun, 24 Dec 2006 01:50:04 +0100 Subject: [config plugin] add support for multi-line setting string values darcs-hash:20061224005004-9b6ab-48a230e5a7697b2c350ccdc80aeb929671c6a234.gz --- lib/plugins/config/settings/config.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'lib/plugins') diff --git a/lib/plugins/config/settings/config.class.php b/lib/plugins/config/settings/config.class.php index ef2ea43a3..203e9dd8f 100644 --- a/lib/plugins/config/settings/config.class.php +++ b/lib/plugins/config/settings/config.class.php @@ -134,7 +134,7 @@ if (!class_exists('configuration')) { if ($this->_format == 'php') { $contents = @php_strip_whitespace($file); - $pattern = '/\$'.$this->_name.'\[[\'"]([^=]+)[\'"]\] ?= ?(.*?);(?=[^;]*(?:\$'.$this->_name.'|@include|$))/'; + $pattern = '/\$'.$this->_name.'\[[\'"]([^=]+)[\'"]\] ?= ?(.*?);(?=[^;]*(?:\$'.$this->_name.'|@include|$))/s'; $matches=array(); preg_match_all($pattern,$contents,$matches,PREG_SET_ORDER); @@ -145,7 +145,7 @@ if (!class_exists('configuration')) { $key = preg_replace('/.\]\[./',CM_KEYMARKER,$matches[$i][1]); // remove quotes from quoted strings & unescape escaped data - $value = preg_replace('/^(\'|")(.*)(?'\\','\\\''=>'\'','\\"'=>'"')); $config[$key] = $value; -- cgit v1.2.3