Fix array_merge so that schemas that are loaded after are merged in to the existing array of schemas.
This commit is contained in:
parent
5bb4493864
commit
84fb1ecdc4
@ -103,7 +103,7 @@ class Doctrine_Import_Schema
|
|||||||
|
|
||||||
foreach ((array) $schema AS $s) {
|
foreach ((array) $schema AS $s) {
|
||||||
if (is_file($s)) {
|
if (is_file($s)) {
|
||||||
$array = array_merge($this->parseSchema($s, $format), $array);
|
$array = array_merge($array, $this->parseSchema($s, $format));
|
||||||
} else if (is_dir($s)) {
|
} else if (is_dir($s)) {
|
||||||
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($s),
|
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($s),
|
||||||
RecursiveIteratorIterator::LEAVES_ONLY);
|
RecursiveIteratorIterator::LEAVES_ONLY);
|
||||||
@ -111,7 +111,7 @@ class Doctrine_Import_Schema
|
|||||||
foreach ($it as $file) {
|
foreach ($it as $file) {
|
||||||
$e = explode('.', $file->getFileName());
|
$e = explode('.', $file->getFileName());
|
||||||
if (end($e) === $format) {
|
if (end($e) === $format) {
|
||||||
$array = array_merge($this->parseSchema($file->getPathName(), $format), $array);
|
$array = array_merge($array, $this->parseSchema($file->getPathName(), $format));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user