mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
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
This commit is contained in:
parent
0aa28943ff
commit
c7ca47f2b1
@ -217,7 +217,8 @@ class SS_ConfigManifest {
|
|||||||
foreach (array('before', 'after') as $order) {
|
foreach (array('before', 'after') as $order) {
|
||||||
if (isset($header[$order])) {
|
if (isset($header[$order])) {
|
||||||
// First, splice into parts (multiple before or after parts are allowed, comma separated)
|
// 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 "*"
|
// For each, parse out into module/file#name, and set any missing to "*"
|
||||||
$header[$order] = array();
|
$header[$order] = array();
|
||||||
|
Loading…
Reference in New Issue
Block a user