mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-19 02:56:15 +00:00
updating db connection setting for model task
git-svn-id: https://svn.cakephp.org/repo/branches/1.2.x.x@5704 3807eeeb-6ff5-0310-8944-8be069107fe0
This commit is contained in:
parent
7aa5dfad0e
commit
08b690d196
1 changed files with 1 additions and 6 deletions
|
@ -69,12 +69,7 @@ class ModelTask extends Shell {
|
|||
$primaryKey = 'id';
|
||||
$validate = array();
|
||||
$associations = array('belongsTo'=> array(), 'hasOne'=> array(), 'hasMany', 'hasAndBelongsToMany'=> array());
|
||||
$usingDefault = $this->in('Will your model be using a database connection setting other than the default?');
|
||||
$useDbConfig = 'default';
|
||||
|
||||
if (low($usingDefault) == 'y' || low($usingDefault) == 'yes') {
|
||||
$useDbConfig = $this->in('Please provide the name of the connection you wish to use.');
|
||||
}
|
||||
$useDbConfig = $this->in('Database Connection:', null, 'default');
|
||||
|
||||
$currentModelName = $this->getName($useDbConfig);
|
||||
$db =& ConnectionManager::getDataSource($useDbConfig);
|
||||
|
|
Loading…
Add table
Reference in a new issue