Permalink
Browse files

Added option to skip SQL insertion of specific connections

  • Loading branch information...
1 parent 07f963b commit c139e382767c5b34fd2889ee8f8e061a0a2c89b3 @willdurand willdurand committed Aug 23, 2011
Showing with 8 additions and 1 deletion.
  1. +8 −1 lib/task/sfPropelInsertSqlTask.class.php
@@ -100,7 +100,7 @@ protected function execute($arguments = array(), $options = array())
), 'QUESTION_LARGE', false)
)
{
- $this->cleanup();
+ $this->cleanup();
$this->logSection('propel', 'Task aborted.');
return 1;
@@ -111,6 +111,13 @@ protected function execute($arguments = array(), $options = array())
mkdir($this->tmpDir, 0777, true);
foreach ($sqls as $connection => $files)
{
+ $database = $databaseManager->getDatabase($connection);
+ if (false === $database->getParameter('insert_sql', true))
+ {
+ $this->logSection('propel', 'Skipped connection: ' . $connection, null, 'ERROR');
+ continue;
+ }
+
$dir = $this->tmpDir.'/'.$connection;
mkdir($dir, 0777, true);

0 comments on commit c139e38

Please sign in to comment.