summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchris <chris@jalakai.co.uk>2006-12-24 01:50:04 +0100
committerchris <chris@jalakai.co.uk>2006-12-24 01:50:04 +0100
commitd1dc65328cfef8cccbb2fd83c98c4716e402dbe7 (patch)
tree57bef92481d1e3fe4a5e75c3fc2d61c02fa29be0
parentc5983034b0e6d9d91733fa0496da56614256afc3 (diff)
downloadrpg-d1dc65328cfef8cccbb2fd83c98c4716e402dbe7.tar.gz
rpg-d1dc65328cfef8cccbb2fd83c98c4716e402dbe7.tar.bz2
[config plugin] add support for multi-line setting string values
darcs-hash:20061224005004-9b6ab-48a230e5a7697b2c350ccdc80aeb929671c6a234.gz
-rw-r--r--lib/plugins/config/settings/config.class.php4
1 files changed, 2 insertions, 2 deletions
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('/^(\'|")(.*)(?<!\\\\)\1$/','$2',$matches[$i][2]);
+ $value = preg_replace('/^(\'|")(.*)(?<!\\\\)\1$/s','$2',$matches[$i][2]);
$value = strtr($value, array('\\\\'=>'\\','\\\''=>'\'','\\"'=>'"'));
$config[$key] = $value;