mirror of
https://github.com/Icinga/icingaweb2-module-businessprocess.git
synced 2026-02-10 14:33:04 -05:00
Add static fetchDb() method to library/Businessprocess/IcingaDbObject.php
Use this static method to get backend in IcingaDbState.
This commit is contained in:
parent
8f68ffe2a8
commit
df3f363f1b
2 changed files with 8 additions and 2 deletions
|
|
@ -2,8 +2,8 @@
|
|||
|
||||
namespace Icinga\Module\Businessprocess;
|
||||
|
||||
use Icinga\Module\Businessprocess\Common\IcingadbDatabase;
|
||||
use Icinga\Module\Icingadb\Common\Auth;
|
||||
use Icinga\Module\Icingadb\Common\Database as IcingadbDatabase;
|
||||
use Icinga\Module\Icingadb\Model\Host;
|
||||
use Icinga\Module\Icingadb\Model\Service;
|
||||
use ipl\Web\Filter\QueryString;
|
||||
|
|
@ -84,4 +84,10 @@ class IcingaDbObject
|
|||
|
||||
return $object;
|
||||
}
|
||||
|
||||
public static function fetchDb()
|
||||
{
|
||||
$object = new self;
|
||||
return $object->getDb();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -25,7 +25,7 @@ class IcingaDbState
|
|||
public function __construct(BpConfig $config)
|
||||
{
|
||||
$this->config = $config;
|
||||
$this->backend = $config->getBackend();
|
||||
$this->backend = IcingaDbObject::fetchDb();
|
||||
}
|
||||
|
||||
public static function apply(BpConfig $config)
|
||||
|
|
|
|||
Loading…
Reference in a new issue