Avoid silly markup like <ul >
authorAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 11 Feb 2010 17:25:03 +0000 (17:25 +0000)
committerAryeh Gregor <simetrical@users.mediawiki.org>
Thu, 11 Feb 2010 17:25:03 +0000 (17:25 +0000)
includes/SkinTemplate.php
skins/Modern.php
skins/MonoBook.php
skins/Vector.php

index e9aac0f..313a2e3 100644 (file)
@@ -314,7 +314,7 @@ class SkinTemplate extends Skin {
                $lang = $wgLang->getCode();
                $dir  = $wgLang->getDir();
                if ( $lang !== $wgContLang->getCode() || $dir !== $wgContLang->getDir() ) {
-                       $attrs = "lang='$lang' xml:lang='$lang' dir='$dir'";
+                       $attrs = " lang='$lang' xml:lang='$lang' dir='$dir'";
 
                        $tpl->set( 'userlangattributes', $attrs );
 
index 14742b2..ef1b1a1 100644 (file)
@@ -106,7 +106,7 @@ class ModernTemplate extends QuickTemplate {
             for the margins -->
        <div id="mw_contentholder" <?php $this->html("specialpageattributes") ?>>
                <div class='mw-topboxes'>
-                       <div id="mw-js-message" style="display:none;" <?php $this->html('userlangattributes')?>></div>
+                       <div id="mw-js-message" style="display:none;"<?php $this->html('userlangattributes')?>></div>
                        <div class="mw-topbox" id="siteSub"><?php $this->msg('tagline') ?></div>
                        <?php if($this->data['newtalk'] ) {
                                ?><div class="usermessage mw-topbox"><?php $this->html('newtalk')  ?></div>
@@ -116,7 +116,7 @@ class ModernTemplate extends QuickTemplate {
                        <?php } ?>
                </div>
 
-               <div id="contentSub" <?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
+               <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
 
                <?php if($this->data['undelete']) { ?><div id="contentSub2"><?php     $this->html('undelete') ?></div><?php } ?>
                <?php if($this->data['showjumplinks']) { ?><div id="jump-to-nav"><?php $this->msg('jumpto') ?> <a href="#mw_portlets"><?php $this->msg('jumptonavigation') ?></a>, <a href="#searchInput"><?php $this->msg('jumptosearch') ?></a></div><?php } ?>
@@ -129,7 +129,7 @@ class ModernTemplate extends QuickTemplate {
        </div><!-- mw_content -->
        </div><!-- mw_contentwrapper -->
 
-       <div id="mw_portlets" <?php $this->html("userlangattributes") ?>>
+       <div id="mw_portlets"<?php $this->html("userlangattributes") ?>>
 
        <!-- portlets -->
        <?php
@@ -177,7 +177,7 @@ class ModernTemplate extends QuickTemplate {
 
 
        <!-- footer -->
-       <div id="footer" <?php $this->html('userlangattributes') ?>>
+       <div id="footer"<?php $this->html('userlangattributes') ?>>
                        <ul id="f-list">
 <?php
                $footerlinks = array(
index 8c67b31..13e3f19 100644 (file)
@@ -73,7 +73,7 @@ class MonoBookTemplate extends QuickTemplate {
        <h1 id="firstHeading" class="firstHeading"><?php $this->html('title') ?></h1>
        <div id="bodyContent">
                <h3 id="siteSub"><?php $this->msg('tagline') ?></h3>
-               <div id="contentSub" <?php $this->html('userlangattributes')  ?>><?php $this->html('subtitle') ?></div>
+               <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html('subtitle') ?></div>
 <?php if($this->data['undelete']) { ?>
                <div id="contentSub2"><?php $this->html('undelete') ?></div>
 <?php } ?><?php if($this->data['newtalk'] ) { ?>
@@ -89,7 +89,7 @@ class MonoBookTemplate extends QuickTemplate {
                <div class="visualClear"></div>
        </div>
 </div></div>
-<div id="column-one" <?php $this->html('userlangattributes')  ?>>
+<div id="column-one"<?php $this->html('userlangattributes')  ?>>
        <div id="p-cactions" class="portlet">
                <h5><?php $this->msg('views') ?></h5>
                <div class="pBody">
@@ -122,7 +122,7 @@ class MonoBookTemplate extends QuickTemplate {
        <div class="portlet" id="p-personal">
                <h5><?php $this->msg('personaltools') ?></h5>
                <div class="pBody">
-                       <ul <?php $this->html('userlangattributes') ?>>
+                       <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
@@ -159,7 +159,7 @@ class MonoBookTemplate extends QuickTemplate {
 ?>
 </div><!-- end of the left (by default at least) column -->
 <div class="visualClear"></div>
-<div id="footer" <?php $this->html('userlangattributes') ?>>
+<div id="footer"<?php $this->html('userlangattributes') ?>>
 <?php
 if($this->data['poweredbyico']) { ?>
        <div id="f-poweredbyico"><?php $this->html('poweredbyico') ?></div>
@@ -300,7 +300,7 @@ if($this->data['copyrightico']) { ?>
                if( $this->data['language_urls'] ) {
 ?>
        <div id="p-lang" class="portlet">
-               <h5 <?php $this->html('userlangattributes') ?>><?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) { ?>
index 5ad6c35..616b784 100644 (file)
@@ -453,7 +453,7 @@ class VectorTemplate extends QuickTemplate {
                <!-- content -->
                <div id="content" <?php $this->html('specialpageattributes') ?>>
                        <a id="top"></a>
-                       <div id="mw-js-message" style="display:none;" <?php $this->html('userlangattributes') ?>></div>
+                       <div id="mw-js-message" style="display:none;"<?php $this->html('userlangattributes') ?>></div>
                        <?php if ( $this->data['sitenotice'] ): ?>
                        <!-- sitenotice -->
                        <div id="siteNotice"><?php $this->html( 'sitenotice' ) ?></div>
@@ -468,7 +468,7 @@ class VectorTemplate extends QuickTemplate {
                                <h3 id="siteSub"><?php $this->msg( 'tagline' ) ?></h3>
                                <!-- /tagline -->
                                <!-- subtitle -->
-                               <div id="contentSub" <?php $this->html('userlangattributes') ?>><?php $this->html( 'subtitle' ) ?></div>
+                               <div id="contentSub"<?php $this->html('userlangattributes') ?>><?php $this->html( 'subtitle' ) ?></div>
                                <!-- /subtitle -->
                                <?php if ( $this->data['undelete'] ): ?>
                                <!-- undelete -->
@@ -526,7 +526,7 @@ class VectorTemplate extends QuickTemplate {
                        </div>
                <!-- /panel -->
                <!-- footer -->
-               <div id="footer" <?php $this->html('userlangattributes') ?>>
+               <div id="footer"<?php $this->html('userlangattributes') ?>>
                        <?php foreach( $validFooterLinks as $category => $links ): ?>
                                <?php if ( count( $links ) > 0 ): ?>
                                <ul id="footer-<?php echo $category ?>">
@@ -579,7 +579,7 @@ class VectorTemplate extends QuickTemplate {
                                case 'TOOLBOX':
 ?>
 <div class="portal" id="p-tb">
-       <h5 <?php $this->html('userlangattributes') ?>><?php $this->msg( 'toolbox' ) ?></h5>
+       <h5<?php $this->html('userlangattributes') ?>><?php $this->msg( 'toolbox' ) ?></h5>
        <div class="body">
                <ul>
                <?php if( $this->data['notspecialpage'] ): ?>
@@ -622,7 +622,7 @@ class VectorTemplate extends QuickTemplate {
                                        if ( $this->data['language_urls'] ) {
 ?>
 <div class="portal" id="p-lang">
-       <h5 <?php $this->html('userlangattributes') ?>><?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 ): ?>
@@ -637,7 +637,7 @@ class VectorTemplate extends QuickTemplate {
                                default:
 ?>
 <div class="portal" id='<?php echo Sanitizer::escapeId( "p-$name" ) ?>'<?php echo $this->skin->tooltip( 'p-' . $name ) ?>>
-       <h5 <?php $this->html('userlangattributes') ?>><?php $out = wfMsg( $name ); if ( wfEmptyMsg( $name, $out ) ) echo htmlspecialchars( $name ); else echo htmlspecialchars( $out ); ?></h5>
+       <h5<?php $this->html('userlangattributes') ?>><?php $out = wfMsg( $name ); if ( wfEmptyMsg( $name, $out ) ) echo htmlspecialchars( $name ); else echo htmlspecialchars( $out ); ?></h5>
        <div class="body">
                <?php if ( is_array( $content ) ): ?>
                <ul>
@@ -680,7 +680,7 @@ class VectorTemplate extends QuickTemplate {
 ?>
 <div id="p-namespaces" class="vectorTabs<?php if ( count( $this->data['namespace_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
        <h5><?php $this->msg('namespaces') ?></h5>
-       <ul <?php $this->html('userlangattributes') ?>>
+       <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'] ?>><span><?php echo htmlspecialchars( $link['text'] ) ?></span></a></li>
                <?php endforeach; ?>
@@ -693,7 +693,7 @@ class VectorTemplate extends QuickTemplate {
 <div id="p-variants" class="vectorMenu<?php if ( count( $this->data['variant_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
        <h5><span><?php $this->msg('variants') ?></span><a href="#"></a></h5>
        <div class="menu">
-               <ul <?php $this->html('userlangattributes') ?>>
+               <ul<?php $this->html('userlangattributes') ?>>
                        <?php foreach ($this->data['variant_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; ?>
@@ -706,7 +706,7 @@ class VectorTemplate extends QuickTemplate {
 ?>
 <div id="p-views" class="vectorTabs<?php if ( count( $this->data['view_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
        <h5><?php $this->msg('views') ?></h5>
-       <ul <?php $this->html('userlangattributes') ?>>
+       <ul<?php $this->html('userlangattributes') ?>>
                <?php foreach ($this->data['view_urls'] as $key => $link ): ?>
                        <li<?php echo $link['attributes'] ?>><a href="<?php echo htmlspecialchars( $link['href'] ) ?>" <?php echo $link['key'] ?>><?php echo (array_key_exists('img',$link) ?  '<img src="'.$link['img'].'" alt="'.$link['text'].'" />' : '<span>'.htmlspecialchars( $link['text'] ).'</span>') ?></a></li>
                <?php endforeach; ?>
@@ -719,7 +719,7 @@ class VectorTemplate extends QuickTemplate {
 <div id="p-cactions" class="vectorMenu<?php if ( count( $this->data['action_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
        <h5><span><?php $this->msg('actions') ?></span><a href="#"></a></h5>
        <div class="menu">
-               <ul <?php $this->html('userlangattributes') ?>>
+               <ul<?php $this->html('userlangattributes') ?>>
                        <?php foreach ($this->data['action_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; ?>
@@ -732,7 +732,7 @@ class VectorTemplate extends QuickTemplate {
 ?>
 <div id="p-personal" class="<?php if ( count( $this->data['personal_urls'] ) == 0 ) echo ' emptyPortlet'; ?>">
        <h5><?php $this->msg('personaltools') ?></h5>
-       <ul <?php $this->html('userlangattributes') ?>>
+       <ul<?php $this->html('userlangattributes') ?>>
                <?php foreach($this->data['personal_urls'] as $key => $item): ?>
                        <li <?php echo $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; ?>
@@ -743,7 +743,7 @@ class VectorTemplate extends QuickTemplate {
                                case 'SEARCH':
 ?>
 <div id="p-search">
-       <h5 <?php $this->html('userlangattributes') ?>><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">
                <input type='hidden' name="title" value="<?php $this->text( 'searchtitle' ) ?>"/>
                <?php if ( $wgVectorUseSimpleSearch ): ?>