diff --git a/library/Director/Web/Table/CustomvarTable.php b/library/Director/Web/Table/CustomvarTable.php index 9460259c..012a47ea 100644 --- a/library/Director/Web/Table/CustomvarTable.php +++ b/library/Director/Web/Table/CustomvarTable.php @@ -2,6 +2,7 @@ namespace Icinga\Module\Director\Web\Table; +use dipl\Html\Html; use dipl\Html\Link; use dipl\Web\Table\ZfQueryBasedTable; use Zend_Db_Adapter_Abstract as ZfDbAdapter; @@ -24,7 +25,7 @@ class CustomvarTable extends ZfQueryBasedTable ]); foreach ($this->getObjectTypes() as $type) { - $tr->add($this::td($this::nobr(sprintf( + $tr->add($this::td(Html::tag('nobr', null, sprintf( $this->translate('%d / %d'), $row->{"cnt_$type"}, $row->{"distinct_$type"} diff --git a/library/Director/Web/Widget/SyncRunDetails.php b/library/Director/Web/Widget/SyncRunDetails.php index ead14f08..83aeff1b 100644 --- a/library/Director/Web/Widget/SyncRunDetails.php +++ b/library/Director/Web/Widget/SyncRunDetails.php @@ -2,6 +2,7 @@ namespace Icinga\Module\Director\Web\Widget; +use dipl\Html\HtmlDocument; use Icinga\Module\Director\Db; use Icinga\Module\Director\Objects\SyncRun; use dipl\Html\Html; @@ -27,6 +28,12 @@ class SyncRunDetails extends NameValueTable ]); } + /** + * @param SyncRun $run + * @return array + * @throws \Icinga\Exception\IcingaException + * @throws \Icinga\Exception\ProgrammingError + */ protected function runSummary(SyncRun $run) { $html = []; @@ -57,7 +64,7 @@ class SyncRunDetails extends NameValueTable $lastId ); - $links = new Html(); + $links = new HtmlDocument(); $links->setSeparator(', '); if ($run->objects_created > 0) { $links->add(new Link( @@ -88,7 +95,7 @@ class SyncRunDetails extends NameValueTable )); } - if ($links->hasContent()) { + if (! $links->isEmpty()) { $html[] = ': '; $html[] = $links; }