Browse files

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
  • Loading branch information...
1 parent 0aa2894 commit c7ca47f2b11c39cbb8ca2e34ecc57bd2cc936bce Hamish Friedlander committed Aug 27, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 core/manifest/ConfigManifest.php
@@ -217,7 +217,8 @@ public function addYAMLConfigFile($basename, $pathname, $depth) {
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();

0 comments on commit c7ca47f

Please sign in to comment.