parent
22eb5911f0
commit
64e1f463a2
|
@ -99,9 +99,13 @@ class Command extends CliCommand
|
|||
protected function db()
|
||||
{
|
||||
if ($this->db === null) {
|
||||
$resourceName = $this->params->get('dbResourceName');
|
||||
|
||||
if ($resourceName === null) {
|
||||
// Hint: not using $this->Config() intentionally. This allows
|
||||
// CLI commands in other modules to use this as a base class.
|
||||
$resourceName = Config::module('director')->get('db', 'resource');
|
||||
}
|
||||
if ($resourceName) {
|
||||
$this->db = Db::fromResourceName($resourceName);
|
||||
} else {
|
||||
|
|
Loading…
Reference in New Issue