From c7ca47f2b11c39cbb8ca2e34ecc57bd2cc936bce Mon Sep 17 00:00:00 2001 From: Hamish Friedlander Date: Mon, 27 Aug 2012 16:00:54 +1200 Subject: [PATCH] FIX Config frag could only have one before or after rule You should be able to specify multiple before and after rules in a config fragment. This was intended to be a comma seperated string but that wasnt being split properly Now if you provide a comma seperated string it is split properly, but you can also provide an array, which is actually cleaner --- core/manifest/ConfigManifest.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/manifest/ConfigManifest.php b/core/manifest/ConfigManifest.php index fcf894a26..86d0d2c60 100644 --- a/core/manifest/ConfigManifest.php +++ b/core/manifest/ConfigManifest.php @@ -217,7 +217,8 @@ class SS_ConfigManifest { foreach (array('before', 'after') as $order) { if (isset($header[$order])) { // First, splice into parts (multiple before or after parts are allowed, comma separated) - $orderparts = preg_split('/\s+,\s+/', $header[$order], PREG_SPLIT_NO_EMPTY); + if (is_array($header[$order])) $orderparts = $header[$order]; + else $orderparts = preg_split('/\s*,\s*/', $header[$order], -1, PREG_SPLIT_NO_EMPTY); // For each, parse out into module/file#name, and set any missing to "*" $header[$order] = array();