<div id="p-cactions" class="portlet">
<h5><?php $this->msg('views') ?></h5>
<div class="pBody">
- <ul <?php echo $this->langAttributes() ?>>
+ <ul <?php $this->html('userlangattributes') ?>>
<?php foreach($this->data['content_actions'] as $key => $tab) {
echo '
<li id="' . Sanitizer::escapeId( "ca-$key" ) . '"';
<div class="portlet" id="p-personal">
<h5><?php $this->msg('personaltools') ?></h5>
<div class="pBody">
- <ul <?php echo $this->langAttributes() ?>>
+ <ul <?php $this->html('userlangattributes') ?>>
<?php foreach($this->data['personal_urls'] as $key => $item) { ?>
<li id="<?php echo Sanitizer::escapeId( "pt-$key" ) ?>"<?php
if ($item['active']) { ?> class="active"<?php } ?>><a href="<?php
global $wgUseTwoButtonsSearchForm;
?>
<div id="p-search" class="portlet">
- <h5 <?php echo $this->langAttributes() ?>><label for="searchInput"><?php $this->msg('search') ?></label></h5>
+ <h5 <?php $this->html('userlangattributes') ?>><label for="searchInput"><?php $this->msg('search') ?></label></h5>
<div id="searchBody" class="pBody">
<form action="<?php $this->text('wgScript') ?>" id="searchform"><div>
<input type='hidden' name="title" value="<?php $this->text('searchtitle') ?>"/>
function toolbox() {
?>
<div class="portlet" id="p-tb">
- <h5 <?php echo $this->langAttributes() ?>><?php $this->msg('toolbox') ?></h5>
+ <h5 <?php $this->html('userlangattributes')?>><?php $this->msg('toolbox') ?></h5>
<div class="pBody">
<ul>
<?php
if( $this->data['language_urls'] ) {
?>
<div id="p-lang" class="portlet">
- <h5 <?php echo $this->langAttributes() ?>><?php $this->msg('otherlanguages') ?></h5>
+ <h5 <?php $this->html('userlangattributes') ?>><?php $this->msg('otherlanguages') ?></h5>
<div class="pBody">
<ul>
<?php foreach($this->data['language_urls'] as $langlink) { ?>
function customBox( $bar, $cont ) {
?>
<div class='generated-sidebar portlet' id='<?php echo Sanitizer::escapeId( "p-$bar" ) ?>'<?php echo $this->skin->tooltip('p-'.$bar) ?>>
- <h5 <?php echo $this->langAttributes() ?>><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo htmlspecialchars($bar); else echo htmlspecialchars($out); ?></h5>
+ <h5 <?php $this->html('userlangattributes') ?>><?php $out = wfMsg( $bar ); if (wfEmptyMsg($bar, $out)) echo htmlspecialchars($bar); else echo htmlspecialchars($out); ?></h5>
<div class='pBody'>
<?php if ( is_array( $cont ) ) { ?>
<ul>
</div>
<?php
}
-
- private function langAttributes() {
- $languageCode = $this->data['userlang'];
- return 'lang="' . $languageCode . '" xml:lang="' . $languageCode . '"';
- }
} // end of class
<div id="personal">
<div class="buffer">
<h5><?php $this->msg('personaltools') ?></h5>
- <ul <?php echo $this->langAttributes() ?>>
+ <ul <?php $this->html('userlangattributes') ?>>
<?php foreach($this->data['personal_urls'] as $key => $item): ?>
<li <?= $item['attributes'] ?>><a href="<?php echo htmlspecialchars($item['href']) ?>"<?php echo $item['key'] ?><?php if(!empty($item['class'])): ?> class="<?php echo htmlspecialchars($item['class']) ?>"<?php endif; ?>><?php echo htmlspecialchars($item['text']) ?></a></li>
<?php endforeach; ?>
<!-- namespaces -->
<div id="namespaces">
<h5><?php $this->msg('namespaces') ?></h5>
- <ul <?php echo $this->langAttributes() ?>>
+ <ul <?php $this->html('userlangattributes') ?>>
<?php foreach ($this->data['namespace_urls'] as $key => $link ): ?>
<li <?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
<?php endforeach; ?>
<div id="variants">
<h5><div class="icon"><span><?php $this->msg('variants') ?></span></div></h5>
<div class="menu">
- <ul <?php echo $this->langAttributes() ?>>
+ <ul <?php $this->html('userlangattributes') ?>>
<?php foreach ($this->data['variant_urls'] as $key => $link ): ?>
<li<?php echo $link['attributes'] ?><?php if(!empty($link['class'])): ?> class="<?php echo htmlspecialchars($link['class']) ?>"<?php endif; ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
<?php endforeach; ?>
<?php if ( count( $this->data['view_urls'] ) > 0 ): ?>
<div id="views">
<h5><?php $this->msg('views') ?></h5>
- <ul <?php echo $this->langAttributes() ?>>
+ <ul <?php $this->html('userlangattributes') ?>>
<?php foreach ($this->data['view_urls'] as $key => $link ): ?>
<li<?php echo $link['attributes'] ?><?php if(!empty($link['class'])): ?> class="<?php echo htmlspecialchars($link['class']) ?>"<?php endif; ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
<?php endforeach; ?>
<div id="actions">
<h5><div class="icon"><span><?php $this->msg('actions') ?></span></div></h5>
<div class="menu">
- <ul <?php echo $this->langAttributes() ?>>
+ <ul <?php $this->html('userlangattributes') ?>>
<?php foreach ($this->data['action_urls'] as $key => $link ): ?>
<li<?php echo $link['attributes'] ?><?php if(!empty($link['class'])): ?> class="<?php echo htmlspecialchars($link['class']) ?>"<?php endif; ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo htmlspecialchars( $link['text'] ) ?></a></li>
<?php endforeach; ?>
<!-- search -->
<div id="search">
<div class="buffer">
- <h5 <?php echo $this->langAttributes() ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h5>
+ <h5 <?php $this->html('userlangattributes') ?>><label for="searchInput"><?php $this->msg( 'search' ) ?></label></h5>
<form action="<?php $this->text( 'wgScript' ) ?>" id="searchform">
<div>
<input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
private function toolBox() {
?>
<div class="portal" id="p-tb">
- <h5 <?php echo $this->langAttributes() ?>><?php $this->msg( 'toolbox' ) ?></h5>
+ <h5 <?php $this->html('userlangattributes') ?>><?php $this->msg( 'toolbox' ) ?></h5>
<div class="body">
<ul>
<?php if( $this->data['notspecialpage'] ): ?>
if( $this->data['language_urls'] ) {
?>
<div class="portal" id="p-lang">
- <h5 <?php echo $this->langAttributes() ?>><?php $this->msg( 'otherlanguages' ) ?></h5>
+ <h5 <?php $this->html('userlangattributes') ?>><?php $this->msg( 'otherlanguages' ) ?></h5>
<div class="body">
<ul>
<?php foreach ( $this->data['language_urls'] as $langlink ): ?>
private function customBox( $bar, $content ) {
?>
<div class="portal" id='<?php echo Sanitizer::escapeId( "p-$bar" ) ?>'<?php echo $this->skin->tooltip( 'p-' . $bar ) ?>>
- <h5 <?php echo $this->langAttributes() ?>><?php $out = wfMsg( $bar ); if ( wfEmptyMsg( $bar, $out ) ) echo htmlspecialchars( $bar ); else echo htmlspecialchars( $out ); ?></h5>
+ <h5 <?php $this->html('userlangattributes') ?>><?php $out = wfMsg( $bar ); if ( wfEmptyMsg( $bar, $out ) ) echo htmlspecialchars( $bar ); else echo htmlspecialchars( $out ); ?></h5>
<div class="body">
<?php if ( is_array( $content ) ): ?>
<ul>
</div>
<?php
}
-
- /**
- * Build attributes describing user language
- * @return HTML and XML Language attributes
- */
- private function langAttributes() {
- return 'lang="' . $this->data['userlang'] . '" xml:lang="' . $this->data['userlang'] . '"';
- }
}