(bug 39680) Convert valign to CSS vertical-align
authorAlex Monk <krenair@gmail.com>
Mon, 27 Aug 2012 19:41:00 +0000 (20:41 +0100)
committerAlex Monk <krenair@gmail.com>
Mon, 27 Aug 2012 20:36:01 +0000 (21:36 +0100)
Also convert align to CSS text-align/float

Change-Id: Ia7da2b51b7fdeee443def8cb06c63a422d89f6f1

includes/CategoryViewer.php
includes/Skin.php
includes/SkinLegacy.php
includes/diff/DifferenceEngine.php
includes/specials/SpecialSearch.php
includes/specials/SpecialUndelete.php
skins/Standard.php

index 4e4f311..5f4aaea 100644 (file)
@@ -504,7 +504,7 @@ class CategoryViewer extends ContextSource {
                # Split into three columns
                $columns = array_chunk( $columns, ceil( count( $columns ) / 3 ), true /* preserve keys */ );
 
-               $ret = '<table width="100%"><tr valign="top">';
+               $ret = '<table width="100%"><tr style="vertical-align: top;">';
                $prevchar = null;
 
                foreach ( $columns as $column ) {
index 5af6aec..38f3895 100644 (file)
@@ -899,7 +899,7 @@ abstract class Skin extends ContextSource {
         */
        function logoText( $align = '' ) {
                if ( $align != '' ) {
-                       $a = " align='{$align}'";
+                       $a = " style='float: {$align};'";
                } else {
                        $a = '';
                }
index aa6b22a..1ae1cb3 100644 (file)
@@ -123,18 +123,18 @@ class LegacyTemplate extends BaseTemplate {
                  "<table border='0' cellspacing='0' width='100%'>\n<tr>\n";
 
                if ( $this->getSkin()->qbSetting() == 0 ) {
-                       $s .= "<td class='top' align='left' valign='top' rowspan='{$rows}'>\n" .
+                       $s .= "<td class='top' style='text-align: left; vertical-align: top;' rowspan='{$rows}'>\n" .
                                $this->getSkin()->logoText( $wgLang->alignStart() ) . '</td>';
                }
 
                $l = $wgLang->alignStart();
-               $s .= "<td {$borderhack} align='$l' valign='top'>\n";
+               $s .= "<td {$borderhack} style='text-align: $l; vertical-align: top;'>\n";
 
                $s .= $this->topLinks();
                $s .= '<p class="subtitle">' . $this->pageTitleLinks() . "</p>\n";
 
                $r = $wgLang->alignEnd();
-               $s .= "</td>\n<td {$borderhack} valign='top' align='$r' nowrap='nowrap'>";
+               $s .= "</td>\n<td {$borderhack} style='text-align: $r; vertical-align: top;' nowrap='nowrap'>";
                $s .= $this->nameAndLogin();
                $s .= "\n<br />" . $this->searchForm() . '</td>';
 
index d9092da..3846473 100644 (file)
@@ -917,7 +917,7 @@ class DifferenceEngine extends ContextSource {
 
                if ( !$diff && !$otitle ) {
                        $header .= "
-                       <tr valign='top'>
+                       <tr style='vertical-align: top;'>
                        <td class='diff-ntitle'>{$ntitle}</td>
                        </tr>";
                        $multiColspan = 1;
@@ -935,17 +935,17 @@ class DifferenceEngine extends ContextSource {
                                $multiColspan = 2;
                        }
                        $header .= "
-                       <tr valign='top'>
+                       <tr style='vertical-align: top;'>
                        <td colspan='$colspan' class='diff-otitle'>{$otitle}</td>
                        <td colspan='$colspan' class='diff-ntitle'>{$ntitle}</td>
                        </tr>";
                }
 
                if ( $multi != '' ) {
-                       $header .= "<tr><td colspan='{$multiColspan}' align='center' class='diff-multi'>{$multi}</td></tr>";
+                       $header .= "<tr><td colspan='{$multiColspan}' style='text-align: center;' class='diff-multi'>{$multi}</td></tr>";
                }
                if ( $notice != '' ) {
-                       $header .= "<tr><td colspan='{$multiColspan}' align='center'>{$notice}</td></tr>";
+                       $header .= "<tr><td colspan='{$multiColspan}' style='text-align: center;'>{$notice}</td></tr>";
                }
 
                return $header . $diff . "</table>";
index 3344436..85365f5 100644 (file)
@@ -667,10 +667,10 @@ class SpecialSearch extends SpecialPage {
                                        return "<li>" .
                                                '<table class="searchResultImage">' .
                                                '<tr>' .
-                                               '<td width="120" align="center" valign="top">' .
+                                               '<td width="120" style="text-align: center; vertical-align: top;">' .
                                                $thumb->toHtml( array( 'desc-link' => true ) ) .
                                                '</td>' .
-                                               '<td valign="top">' .
+                                               '<td style="vertical-align: top;">' .
                                                $link .
                                                $extract .
                                                "<div class='mw-search-result-data'>{$score}{$desc} - {$date}{$related}</div>" .
index e2eab73..39a8a39 100644 (file)
@@ -914,10 +914,10 @@ class SpecialUndelete extends SpecialPage {
                        "<col class='diff-marker' />" .
                        "<col class='diff-content' />" .
                        "<tr>" .
-                               "<td colspan='2' width='50%' align='center' class='diff-otitle'>" .
+                               "<td colspan='2' width='50%' style='text-align: center' class='diff-otitle'>" .
                                $this->diffHeader( $previousRev, 'o' ) .
                                "</td>\n" .
-                               "<td colspan='2' width='50%' align='center' class='diff-ntitle'>" .
+                               "<td colspan='2' width='50%' style='text-align: center' class='diff-ntitle'>" .
                                $this->diffHeader( $currentRev, 'n' ) .
                                "</td>\n" .
                        "</tr>" .
index e47b35f..5461309 100644 (file)
@@ -67,7 +67,7 @@ class StandardTemplate extends LegacyTemplate {
                wfProfileOut( __METHOD__ . '-1' );
                wfProfileIn( __METHOD__ . '-2' );
                $l = $this->getSkin()->getLanguage()->alignStart();
-               $s .= "<td class='bottom' align='$l' valign='top'>";
+               $s .= "<td class='bottom' style='text-align: $l; vertical-align: top;'>";
 
                $s .= $this->bottomLinks();
                $s .= "\n<br />" . $this->getSkin()->getLanguage()->pipeList( array(