global $wgLocalStylePath, $wgRequest;
parent::initPage( $out );
-
+
// Append CSS which includes IE only behavior fixes for hover support -
// this is better than including this in a CSS fille since it doesn't
// wait for the CSS file to load before fetching the HTC file.
htmlspecialchars( $wgLocalStylePath ) .
"/{$this->stylename}/csshover{$min}.htc\")}</style><![endif]-->"
);
-
+
$out->addModuleScripts( 'skins.vector' );
}
// Build additional attributes for navigation urls
//$nav = $this->skin->buildNavigationUrls();
$nav = $this->data['content_navigation'];
-
+
if ( $wgVectorUseIconWatch ) {
$mode = $this->skin->getTitle()->userIsWatching() ? 'unwatch' : 'watch';
if ( isset( $nav['actions'][$mode] ) ) {
if ( $section == 'views' && !( isset( $link['primary'] ) && $link['primary'] ) ) {
$link['class'] = rtrim( 'collapsible ' . $link['class'], ' ' );
}
-
+
$xmlID = isset( $link['id'] ) ? $link['id'] : 'ca-' . $xmlID;
$nav[$section][$key]['attributes'] =
' id="' . Sanitizer::escapeId( $xmlID ) . '"';
}
if ( isset( $link['tooltiponly'] ) && $link['tooltiponly'] ) {
$nav[$section][$key]['key'] =
- Linker::tooltip( $xmlID );
+ Linker::titleAttrib( $xmlID );
} else {
$nav[$section][$key]['key'] =
Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( $xmlID ) );
<div id="mw-page-base" class="noprint"></div>
<div id="mw-head-base" class="noprint"></div>
<!-- content -->
- <div id="content"<?php $this->html( 'specialpageattributes' ) ?>>
+ <div id="content">
<a id="top"></a>
<div id="mw-js-message" style="display:none;"<?php $this->html( 'userlangattributes' ) ?>></div>
<?php if ( $this->data['sitenotice'] ): ?>
</div>
<!-- /printfooter -->
<?php endif; ?>
- <!-- debughtml -->
- <?php $this->html( 'debughtml' ); ?>
- <!-- /debughtml -->
<?php if ( $this->data['catlinks'] ): ?>
<!-- catlinks -->
<?php $this->html( 'catlinks' ); ?>
<!-- /dataAfterContent -->
<?php endif; ?>
<div class="visualClear"></div>
+ <!-- debughtml -->
+ <?php $this->html( 'debughtml' ); ?>
+ <!-- /debughtml -->
</div>
<!-- /bodyContent -->
</div>
<!-- panel -->
<div id="mw-panel" class="noprint">
<!-- logo -->
- <div id="p-logo"><a style="background-image: url(<?php $this->text( 'logopath' ) ?>);" href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ?>></a></div>
+ <div id="p-logo"><a style="background-image: url(<?php $this->text( 'logopath' ) ?>);" href="<?php echo htmlspecialchars( $this->data['nav_urls']['mainpage']['href'] ) ?>" <?php echo Xml::expandAttributes( Linker::tooltipAndAccesskeyAttribs( 'p-logo' ) ) ?>></a></div>
<!-- /logo -->
<?php $this->renderPortals( $this->data['sidebar'] ); ?>
</div>
/**
* Render a series of portals
+ *
+ * @param $portals array
*/
private function renderPortals( $portals ) {
// Force the rendering of the following portals
}
// Render portals
foreach ( $portals as $name => $content ) {
+ if ( $content === false )
+ continue;
+
echo "\n<!-- {$name} -->\n";
switch( $name ) {
case 'SEARCH':
$msg = $name;
}
?>
-<div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo Linker::tooltip( 'p-' . $name ) ?>>
- <h5<?php $this->html( 'userlangattributes' ) ?>><?php $out = wfMsg( $msg ); if ( wfEmptyMsg( $msg ) ) echo htmlspecialchars( $msg ); else echo htmlspecialchars( $out ); ?></h5>
+<div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo Linker::titleAttrib( 'p-' . $name ) ?>>
+ <h5<?php $this->html( 'userlangattributes' ) ?>><?php $msgObj = wfMessage( $msg ); echo htmlspecialchars( $msgObj->exists() ? $msgObj->text() : $msg ); ?></h5>
<div class="body">
<?php
if ( is_array( $content ) ): ?>
/**
* Render one or more navigations elements by name, automatically reveresed
* when UI is in RTL mode
+ *
+ * @param $elements array
*/
private function renderNavigation( $elements ) {
- global $wgVectorUseSimpleSearch, $wgVectorShowVariantName, $wgUser;
+ global $wgVectorUseSimpleSearch, $wgVectorShowVariantName, $wgUser, $wgLang;
// If only one element was given, wrap it in an array, allowing more
// flexible arguments
if ( !is_array( $elements ) ) {
$elements = array( $elements );
// If there's a series of elements, reverse them when in RTL mode
- } elseif ( wfUILang()->isRTL() ) {
+ } elseif ( $wgLang->isRTL() ) {
$elements = array_reverse( $elements );
}
// Render elements