don't show see-all if less than hard max

This commit is contained in:
Evan Prodromou 2011-07-07 10:58:44 -04:00
parent 749804f8cb
commit 12e0f89155

View File

@ -103,11 +103,13 @@ class MoreMenu extends Menu
$this->item($actionName, $args, $label, $description, $id, 'extended_menu'); $this->item($actionName, $args, $label, $description, $id, 'extended_menu');
} }
$seeAll = $this->seeAllItem(); if ($total > self::HARD_MAX) {
$seeAll = $this->seeAllItem();
if (!empty($seeAll)) { if (!empty($seeAll)) {
list($actionName, $args, $label, $description, $id) = $seeAll; list($actionName, $args, $label, $description, $id) = $seeAll;
$this->item($actionName, $args, $label, $description, $id, 'extended_menu see_all'); $this->item($actionName, $args, $label, $description, $id, 'extended_menu see_all');
}
} }
} }