Only show the site_nav_object block if Action::showObjectNav has been overridden to do something.

(Copied similar check from showPageNoticeBlock, handy!)
This commit is contained in:
Brion Vibber 2011-03-09 12:07:26 -08:00
parent 0a19949f6d
commit 1f9a9c69bc

View File

@ -713,16 +713,24 @@ class Action extends HTMLOutputter // lawsuit
/** /**
* Show menu for an object (group, profile) * Show menu for an object (group, profile)
* *
* This block will only show if a subclass has overridden
* the showObjectNav() method.
*
* @return nothing * @return nothing
*/ */
function showObjectNavBlock() function showObjectNavBlock()
{ {
// Need to have this ID for CSS; I'm too lazy to add it to $rmethod = new ReflectionMethod($this, 'showObjectNav');
// all menus $dclass = $rmethod->getDeclaringClass()->getName();
$this->elementStart('div', array('id' => 'site_nav_object',
'class' => 'section')); if ($dclass != 'Action') {
$this->showObjectNav(); // Need to have this ID for CSS; I'm too lazy to add it to
$this->elementEnd('div'); // all menus
$this->elementStart('div', array('id' => 'site_nav_object',
'class' => 'section'));
$this->showObjectNav();
$this->elementEnd('div');
}
} }
/** /**