HOR-3821
update
This commit is contained in:
@@ -223,6 +223,7 @@ function run_propel_build_model($task, $args)
|
|||||||
|
|
||||||
function run_propel_build_sql($task, $args)
|
function run_propel_build_sql($task, $args)
|
||||||
{
|
{
|
||||||
|
$alternateDir = '';
|
||||||
if (isset ($args[1])) {
|
if (isset ($args[1])) {
|
||||||
$propelIniFile = $args[1] . '.ini';
|
$propelIniFile = $args[1] . '.ini';
|
||||||
$alternateDir = '';
|
$alternateDir = '';
|
||||||
@@ -239,8 +240,6 @@ function run_propel_build_sql($task, $args)
|
|||||||
|
|
||||||
pake_echo_action('propel.ini', "using the file : $propelIniFile ");
|
pake_echo_action('propel.ini', "using the file : $propelIniFile ");
|
||||||
$alternateDir = PATH_PLUGINS . $path[0] . PATH_SEP;
|
$alternateDir = PATH_PLUGINS . $path[0] . PATH_SEP;
|
||||||
//_call_phing($task, 'om', false, $path[1] . '.ini' , PATH_PLUGINS . $path[0] . PATH_SEP );
|
|
||||||
//return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -249,19 +248,22 @@ function run_propel_build_sql($task, $args)
|
|||||||
|
|
||||||
if (!in_array($args[0], $aDB)) {
|
if (!in_array($args[0], $aDB)) {
|
||||||
throw new Exception('invalid database Adapter, available:[mysql|mssql|oracle|pgsql].');
|
throw new Exception('invalid database Adapter, available:[mysql|mssql|oracle|pgsql].');
|
||||||
}
|
} else {
|
||||||
else {
|
|
||||||
switch ($args [0]) {
|
switch ($args [0]) {
|
||||||
case 'mysql' : if ( $alternateDir != '' )
|
case 'mysql' :
|
||||||
|
if ($alternateDir != '')
|
||||||
_call_phing($task, 'sql', false, 'propel.mysql.ini', $alternateDir);
|
_call_phing($task, 'sql', false, 'propel.mysql.ini', $alternateDir);
|
||||||
else
|
else
|
||||||
_call_phing($task, 'sql', true, 'propel.mysql.ini');
|
_call_phing($task, 'sql', true, 'propel.mysql.ini');
|
||||||
break;
|
break;
|
||||||
case 'mssql' : _call_phing($task, 'sql', true, 'propel.mssql.ini' );
|
case 'mssql' :
|
||||||
|
_call_phing($task, 'sql', true, 'propel.mssql.ini');
|
||||||
break;
|
break;
|
||||||
case 'oracle' : _call_phing($task, 'sql', true, 'propel.oracle.ini' );
|
case 'oracle' :
|
||||||
|
_call_phing($task, 'sql', true, 'propel.oracle.ini');
|
||||||
break;
|
break;
|
||||||
case 'pgsql' : _call_phing($task, 'sql', true, 'propel.pgsql.ini' );
|
case 'pgsql' :
|
||||||
|
_call_phing($task, 'sql', true, 'propel.pgsql.ini');
|
||||||
break;
|
break;
|
||||||
default :
|
default :
|
||||||
throw new Exception('specify database Adapter, valid values are: mysql, mssql, oracle, pgsql.');
|
throw new Exception('specify database Adapter, valid values are: mysql, mssql, oracle, pgsql.');
|
||||||
|
|||||||
Reference in New Issue
Block a user