aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/sfIsisImporterManager.class.php18
1 files changed, 15 insertions, 3 deletions
diff --git a/lib/sfIsisImporterManager.class.php b/lib/sfIsisImporterManager.class.php
index 460c080..756de8c 100644
--- a/lib/sfIsisImporterManager.class.php
+++ b/lib/sfIsisImporterManager.class.php
@@ -7,12 +7,12 @@
class sfIsisImporterManager extends IsisConnector
{
/**
- * @var string $loglevel Log level.
+ * @var string $loglevel Log level
*/
var $loglevel = 'info';
/**
- * @var int $processed Number of processed entries.
+ * @var int $processed Number of processed entries
*/
var $processed = 0;
@@ -83,9 +83,21 @@ class sfIsisImporterManager extends IsisConnector
*/
public function databases()
{
+ $databases = array();
+
foreach (glob(sfConfig::get('sf_lib_dir') ."/cinisis/schemas/*.yaml") as $file)
{
- $databases[] = basename($file, '.yaml');
+ $database = basename($file, '.yaml');
+ $options = sfYaml::load($file);
+
+ if (isset($options['db']['order']))
+ {
+ $databases[$options['db']['order']] = $database;
+ }
+ else
+ {
+ $this->log("Database config $database has no order option, skipping.");
+ }
}
return $databases;