Replace `MonitoringBackend::createBackend()` with `MonitoringBackend::instance()`
This commit is contained in:
parent
49bea36345
commit
60756afa34
|
@ -25,8 +25,7 @@ class ListCommand extends Command
|
|||
|
||||
public function init()
|
||||
{
|
||||
$this->app->setupZendAutoloader();
|
||||
$this->backend = Backend::createBackend($this->params->shift('backend'));
|
||||
$this->backend = Backend::instance($this->params->shift('backend'));
|
||||
$this->dumpSql = $this->params->shift('showsql');
|
||||
}
|
||||
|
||||
|
|
|
@ -215,7 +215,7 @@ class ConfigController extends Controller
|
|||
$form->setTitle(sprintf($this->translate('Edit Command Transport %s'), $transportName));
|
||||
$form->setIniConfig($this->Config('commandtransports'));
|
||||
$form->setInstanceNames(
|
||||
Backend::createBackend()->select()->from('instance', array('instance_name'))->fetchColumn()
|
||||
Backend::instance()->select()->from('instance', array('instance_name'))->fetchColumn()
|
||||
);
|
||||
$form->setOnSuccess(function (TransportConfigForm $form) use ($transportName) {
|
||||
try {
|
||||
|
@ -259,7 +259,7 @@ class ConfigController extends Controller
|
|||
$form->setTitle($this->translate('Create New Command Transport'));
|
||||
$form->setIniConfig($this->Config('commandtransports'));
|
||||
$form->setInstanceNames(
|
||||
Backend::createBackend()->select()->from('instance', array('instance_name'))->fetchColumn()
|
||||
Backend::instance()->select()->from('instance', array('instance_name'))->fetchColumn()
|
||||
);
|
||||
$form->setOnSuccess(function (TransportConfigForm $form) {
|
||||
try {
|
||||
|
|
|
@ -28,7 +28,7 @@ class Controller extends IcingaWebController
|
|||
|
||||
protected function moduleInit()
|
||||
{
|
||||
$this->backend = Backend::createBackend($this->_getParam('backend'));
|
||||
$this->backend = Backend::instance($this->_getParam('backend'));
|
||||
$this->view->url = Url::fromRequest();
|
||||
}
|
||||
|
||||
|
|
|
@ -53,7 +53,7 @@ class Bug7043Test extends BaseTestCase
|
|||
)
|
||||
)));
|
||||
|
||||
$defaultBackend = Backend::createBackend();
|
||||
$defaultBackend = Backend::instance();
|
||||
|
||||
$this->assertEquals('backendName', $defaultBackend->getName(), 'Default backend has name set');
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue