mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-24 06:14:25 +02:00
Doc: Fix detection whether documentation is empty
This commit is contained in:
parent
720e022bea
commit
dad9538496
@ -84,4 +84,14 @@ class TreeNodeIterator implements RecursiveIterator
|
||||
{
|
||||
return new static($this->current());
|
||||
}
|
||||
|
||||
/**
|
||||
* Get whether the iterator is empty
|
||||
*
|
||||
* @return bool
|
||||
*/
|
||||
public function isEmpty()
|
||||
{
|
||||
return empty($this->children);
|
||||
}
|
||||
}
|
||||
|
@ -70,7 +70,7 @@ class DocTocRenderer extends DocRenderer
|
||||
*/
|
||||
public function render()
|
||||
{
|
||||
if (empty($this->content)) {
|
||||
if ($this->getInnerIterator()->isEmpty()) {
|
||||
return '<p>' . mt('doc', 'Documentation is empty.') . '</p>';
|
||||
}
|
||||
$view = $this->getView();
|
||||
|
Loading…
x
Reference in New Issue
Block a user