1
0
mirror of synced 2024-12-13 22:56:04 +03:00

Builder was broken. Applied patch sent by Carl Michael Skog.

This commit is contained in:
nicobn 2007-07-10 15:20:13 +00:00
parent e47a72d3ce
commit befc0c16b0

View File

@ -116,7 +116,7 @@ END;
*/
public function buildDefinition($table, $tableColumns)
{
$columns = array(0 => str_repeat(' ', 8) . '$this->setTableName(\'$table\');');
$columns = array(0 => str_repeat(' ', 8) . '$this->setTableName(\''. $table .'\');');
$i = 1;
foreach ($tableColumns as $name => $column) {
@ -169,6 +169,10 @@ END;
public function buildRecord($table, $tableColumns, $className='', $fileName='')
{
if (empty($className)) {
$className = Doctrine::classify($table);
}
if (empty($fileName)) {
if (empty($this->path)) {
$errMsg = 'No build target directory set.';
@ -186,10 +190,6 @@ END;
$created = date('l dS \of F Y h:i:s A');
if (empty($className)) {
$className = Doctrine::classify($table);
}
$content = sprintf(self::$tpl, $created, $className,
$this->buildDefinition($table, $tableColumns));