X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Fskins%2FSkin.php;h=07a2e87801914f9cccee77af96fd4d1919d67556;hb=4e34450dca695ec5af69e79ecef6c8f832f4599e;hp=dc25c6cdc8bd2eb32cb13e4acd915ebb0668f980;hpb=a373befd6c2bdff6347de45d793f99f69b1d910a;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/skins/Skin.php b/includes/skins/Skin.php index dc25c6cdc8..07a2e87801 100644 --- a/includes/skins/Skin.php +++ b/includes/skins/Skin.php @@ -365,8 +365,8 @@ abstract class Skin extends ContextSource { */ static function makeVariablesScript( $data ) { if ( $data ) { - return Html::inlineScript( - ResourceLoader::makeLoaderConditionalScript( ResourceLoader::makeConfigSetScript( $data ) ) + return ResourceLoader::makeInlineScript( + ResourceLoader::makeConfigSetScript( $data ) ); } else { return ''; @@ -1477,7 +1477,8 @@ abstract class Skin extends ContextSource { * Get a cached notice * * @param string $name Message name, or 'default' for $wgSiteNotice - * @return string HTML fragment + * @return string|bool HTML fragment, or false to indicate that the caller + * should fall back to the next notice in its sequence */ private function getCachedNotice( $name ) { global $wgRenderHashAppend, $parserMemc, $wgContLang; @@ -1493,7 +1494,9 @@ abstract class Skin extends ContextSource { } } else { $msg = $this->msg( $name )->inContentLanguage(); - if ( $msg->isDisabled() ) { + if ( $msg->isBlank() ) { + return ''; + } elseif ( $msg->isDisabled() ) { return false; } $notice = $msg->plain(); @@ -1554,13 +1557,13 @@ abstract class Skin extends ContextSource { $siteNotice = $this->getCachedNotice( 'sitenotice' ); } else { $anonNotice = $this->getCachedNotice( 'anonnotice' ); - if ( !$anonNotice ) { + if ( $anonNotice === false ) { $siteNotice = $this->getCachedNotice( 'sitenotice' ); } else { $siteNotice = $anonNotice; } } - if ( !$siteNotice ) { + if ( $siteNotice === false ) { $siteNotice = $this->getCachedNotice( 'default' ); } }