Merge "Wrap the sitenotice with div element as other skins do"

This commit is contained in:
jenkins-bot 2021-12-15 21:35:58 +00:00 committed by Gerrit Code Review
commit 1b9d92e17d

View file

@ -656,11 +656,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;
}