Remove use of QuickTemplate::setRef
Follows-up 2c01147c13be, 429f557cc7f68a46. The array is already copied by value once returned from getLanguages(). Setting it by reference within the QuickTemplate instance doens't have any effect, but does logically break the concept of pushing data in a single direction through the skin. Remove use of setRef in preparation for restricting skins only consuming data as given, without the ability to change data in other parts of the system. Bug: T140664 Change-Id: I0978dd5c123fda57f45534a8d2e51b7e65e55223
This commit is contained in:
parent
8cd73c01af
commit
08985b2229
|
@ -593,12 +593,9 @@ class SkinMinerva extends SkinTemplate implements ICustomizableSkin {
|
|||
$lang = $this->getTitle()->getPageViewLanguage();
|
||||
$tpl->set( 'pageLang', $lang->getHtmlCode() );
|
||||
$tpl->set( 'pageDir', $lang->getDir() );
|
||||
$language_urls = $this->getLanguages();
|
||||
if ( count( $language_urls ) ) {
|
||||
$tpl->setRef( 'language_urls', $language_urls );
|
||||
} else {
|
||||
$tpl->set( 'language_urls', false );
|
||||
}
|
||||
// If the array is empty, then instead give the skin boolean false
|
||||
$language_urls = $this->getLanguages() ?: false;
|
||||
$tpl->set( 'language_urls', $language_urls );
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue