Fixes Ticket #1607 - empty 'page-notice' definition lists were
being output in a bunch of places.
This commit is contained in:
parent
79fa050125
commit
89d0583b91
|
@ -575,10 +575,21 @@ class Action extends HTMLOutputter // lawsuit
|
||||||
/**
|
/**
|
||||||
* Show page notice block.
|
* 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
|
* @return nothing
|
||||||
*/
|
*/
|
||||||
function showPageNoticeBlock()
|
function showPageNoticeBlock()
|
||||||
{
|
{
|
||||||
|
$rmethod = new ReflectionMethod($this, 'showPageNotice');
|
||||||
|
$dclass = $rmethod->getDeclaringClass()->getName();
|
||||||
|
|
||||||
|
if ($dclass != 'Action' || Event::hasHandler('StartShowPageNotice')) {
|
||||||
|
|
||||||
$this->elementStart('dl', array('id' => 'page_notice',
|
$this->elementStart('dl', array('id' => 'page_notice',
|
||||||
'class' => 'system_notice'));
|
'class' => 'system_notice'));
|
||||||
$this->element('dt', null, _('Page notice'));
|
$this->element('dt', null, _('Page notice'));
|
||||||
|
@ -590,6 +601,7 @@ class Action extends HTMLOutputter // lawsuit
|
||||||
$this->elementEnd('dd');
|
$this->elementEnd('dd');
|
||||||
$this->elementEnd('dl');
|
$this->elementEnd('dl');
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Show page notice.
|
* Show page notice.
|
||||||
|
|
Loading…
Reference in New Issue
Block a user