Fixes Ticket #1607 - empty 'page-notice' definition lists were

being output in a bunch of places.
This commit is contained in:
Zach Copley 2009-06-12 17:06:42 -07:00
parent 79fa050125
commit 89d0583b91

View File

@ -575,10 +575,21 @@ class Action extends HTMLOutputter // lawsuit
/**
* Show page notice block.
*
* Only show the block if a subclassed action has overrided
* Action::showPageNotice(), or an event handler is registered for
* the StartShowPageNotice event, in which case we assume the
* 'page_notice' definition list is desired. This is to prevent
* empty 'page_notice' definition lists from being output everywhere.
*
* @return nothing
*/
function showPageNoticeBlock()
{
$rmethod = new ReflectionMethod($this, 'showPageNotice');
$dclass = $rmethod->getDeclaringClass()->getName();
if ($dclass != 'Action' || Event::hasHandler('StartShowPageNotice')) {
$this->elementStart('dl', array('id' => 'page_notice',
'class' => 'system_notice'));
$this->element('dt', null, _('Page notice'));
@ -590,6 +601,7 @@ class Action extends HTMLOutputter // lawsuit
$this->elementEnd('dd');
$this->elementEnd('dl');
}
}
/**
* Show page notice.