Skip to content

Commit

Permalink
Merge pull request propelorm#710 from MaksSlesarenko/master
Browse files Browse the repository at this point in the history
fix for datadump task to use datasource's credentials instead of build.properties
  • Loading branch information
willdurand committed Feb 14, 2014
2 parents e53ccc8 + 584e2a4 commit 36bab71
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions generator/lib/task/PropelDataDumpTask.php
Expand Up @@ -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());
Expand Down

0 comments on commit 36bab71

Please sign in to comment.