Wrap the sitenotice with div element as other skins do

Change-Id: Ifea461636f9000527556dc2881f83f00be5bff76
This commit is contained in:
Func 2021-12-10 11:11:35 +00:00
parent dddde1c208
commit b4b2f4ded3

View file

@ -638,11 +638,11 @@ class SkinMinerva extends SkinMustache {
* @return array
*/
protected function prepareBanners( $siteNotice ) {
$banners = [ '<div id="siteNotice"></div>' ];
if ( $this->getConfig()->get( 'MinervaEnableSiteNotice' ) ) {
if ( $siteNotice ) {
$banners[] = $siteNotice;
}
$banners = [];
if ( $siteNotice && $this->getConfig()->get( 'MinervaEnableSiteNotice' ) ) {
$banners[] = '<div id="siteNotice">' . $siteNotice . '</div>';
} else {
$banners[] = '<div id="siteNotice"></div>';
}
return $banners;
}