Permalink
Browse files

Merge pull request #710 from MaksSlesarenko/master

fix for datadump task to use datasource's credentials instead of build.properties
  • Loading branch information...
2 parents e53ccc8 + 584e2a4 commit 36bab714eb65ae213f51ef1bc8c771c065a88398 @willdurand willdurand committed Feb 14, 2014
Showing with 1 addition and 13 deletions.
  1. +1 −13 generator/lib/task/PropelDataDumpTask.php
View
14 generator/lib/task/PropelDataDumpTask.php
@@ -281,19 +281,7 @@ public function main()
$this->log("Writing to XML file: " . $outFile->getName());
try {
-
- $url = str_replace("@DB@", $database->getName(), $this->databaseUrl);
-
- if ($url !== $this->databaseUrl) {
- $this->log("New (resolved) URL: " . $url, Project::MSG_VERBOSE);
- }
-
- if (empty($url)) {
- throw new BuildException("Unable to connect to database; no PDO connection URL specified.", $this->getLocation());
- }
-
- $this->conn = new PDO($url, $this->databaseUser, $this->databasePassword);
- $this->conn->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
+ $this->conn = $dataModel->getGeneratorConfig()->getBuildPDO($database->getName());
$doc = $this->createXMLDoc($database);
$doc->save($outFile->getAbsolutePath());

0 comments on commit 36bab71

Please sign in to comment.