mirror of
https://github.com/Pathduck/gallery3.git
synced 2026-06-03 10:19:47 -04:00
Some HTML validation fixes (don't render empty <ul> lists, empty id attributes, use & not &)
This commit is contained in:
@@ -216,6 +216,19 @@ class Menu_Core extends Menu_Element {
|
||||
return null;
|
||||
}
|
||||
|
||||
public function is_empty() {
|
||||
foreach ($this->elements as $element) {
|
||||
if ($element instanceof Menu) {
|
||||
if (!$element->is_empty()) {
|
||||
return false;
|
||||
}
|
||||
} else {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
public function render() {
|
||||
$view = new View(isset($this->view) ? $this->view : "menu.html");
|
||||
$view->menu = $this;
|
||||
|
||||
Reference in New Issue
Block a user