Commit 852a2fdf authored by Jonathan.Wage's avatar Jonathan.Wage

Fixes to importing and merging of data fixtures from multiple files.

parent 05119fe7
......@@ -64,7 +64,7 @@ class Doctrine_Data_Import extends Doctrine_Data
// If they specified a specific yml file
if (end($e) == 'yml') {
$array = array_merge($array, Doctrine_Parser::load($dir, $this->getFormat()));
$array = array_merge_recursive(Doctrine_Parser::load($dir, $this->getFormat()), $array);
// If they specified a directory
} else if(is_dir($dir)) {
$it = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($dir),
......@@ -73,7 +73,7 @@ class Doctrine_Data_Import extends Doctrine_Data
foreach ($it as $file) {
$e = explode('.', $file->getFileName());
if (in_array(end($e), $this->getFormats())) {
$array = array_merge($array, Doctrine_Parser::load($file->getPathName(), $this->getFormat()));
$array = array_merge_recursive(Doctrine_Parser::load($file->getPathName(), $this->getFormat()), $array);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment