ObjectsController: template table for templates...

...but load the other one first to trick the autoloader
This commit is contained in:
Thomas Gelf 2016-10-26 00:17:03 +00:00
parent 5b58aad56b
commit 5407c4fe7c
2 changed files with 3 additions and 1 deletions

View File

@ -4,7 +4,6 @@ namespace Icinga\Module\Director\Tables;
use Icinga\Module\Director\Tables\IcingaHostTable;
require_once __DIR__ . '/IcingaHostTable.php';
class IcingaHostTemplateTable extends IcingaHostTable
{
protected $searchColumns = array(

View File

@ -112,7 +112,10 @@ abstract class ObjectsController extends ActionController
$table = 'icinga' . ucfirst($type);
} elseif ($dummy->isTemplate()) {
$this->getTabs()->activate('templates');
// Trick the autoloader
$table = 'icinga' . ucfirst($type);
$this->loadTable($table);
$table .= 'Template';
} else {
$this->getTabs()->activate('objects');
$table = 'icinga' . ucfirst($type);