Handle `$this->data['language_urls'] === false` specially

Per 53ab861a2fcba98d876e5a2be5af7bc7186b880c, extensions can set this
to an empty array to have the sidebar section displayed even if it has
no items. Wikidata and UniversalLanguageSelector rely on this.

Change-Id: I7037b4fac973bdcc1e21484c8039ceb7e33f8195
isekai
Bartosz Dziewoński 8 years ago
parent 01d6aaa1a9
commit 8c7cfa91c5

@ -612,7 +612,7 @@ class TimelessTemplate extends BaseTemplate {
];
// Goes in the page-primary in mobile, doesn't appear otherwise
if ( $this->data['language_urls'] ) {
if ( $this->data['language_urls'] !== false ) {
$pileOfTools['languages'] = [
'text' => $this->getMsg( 'timeless-languages' )->escaped(),
'id' => 'ca-languages',
@ -821,7 +821,7 @@ class TimelessTemplate extends BaseTemplate {
} else {
$variants = '';
}
if ( $this->data['language_urls'] ) {
if ( $this->data['language_urls'] !== false ) {
$html .= $this->getSidebarChunk(
'other-languages',
@ -829,7 +829,7 @@ class TimelessTemplate extends BaseTemplate {
$variants .
$this->getPortlet(
'lang',
$this->data['language_urls'],
$this->data['language_urls'] ?: [],
'otherlanguages'
)
);

Loading…
Cancel
Save