Skip to content

Commit

Permalink
Merge pull request #407 from grray/master
Browse files Browse the repository at this point in the history
Fix for using platform class configured in build properties
  • Loading branch information
willdurand committed Jul 13, 2012
2 parents 251b03e + 66f91c9 commit 8c2d287
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions generator/lib/config/GeneratorConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -156,11 +156,11 @@ public function getBuilderClassname($type)
public function getConfiguredPlatform(PDO $con = null, $database = null)
{
$buildConnection = $this->getBuildConnection($database);
if (null !== $buildConnection['adapter']) {
$clazz = Phing::import('platform.' . ucfirst($buildConnection['adapter']) . 'Platform');
} elseif ($this->getBuildProperty('platformClass')) {
if ($this->getBuildProperty('platformClass')) {
// propel.platform.class = platform.${propel.database}Platform by default
$clazz = $this->getClassname('platformClass');
} elseif (null !== $buildConnection['adapter']) {
$clazz = Phing::import('platform.' . ucfirst($buildConnection['adapter']) . 'Platform');
} else {
return null;
}
Expand Down

0 comments on commit 8c2d287

Please sign in to comment.