Follow-up r53286: More fixes for invalid HTML
[lhc/web/wiklou.git] / includes / specials / SpecialAllmessages.php
index 9055634..dd3ce6d 100644 (file)
@@ -33,8 +33,8 @@ class SpecialAllmessages extends SpecialPage {
                $this->prefix = $wgRequest->getVal( 'prefix', '' );
 
                $this->table = new AllmessagesTablePager( $this,
-                                                                                       $conds=array(),
-                                                                                       wfGetLangObj( $wgRequest->getVal( 'lang', false ) ) );
+                                                                                       $conds = array(),
+                                                                                       wfGetLangObj( $wgRequest->getVal( 'lang', $par ) ) );
 
                $this->langCode = $this->table->lang->getCode();
 
@@ -66,7 +66,7 @@ class SpecialAllmessages extends SpecialPage {
                        </tr>
                        <tr>\n
                                <td class='mw-label'>" .
-                                       Xml::label( wfMsg( 'allmessages-filter' ), 'mw-allmessages-form-filter' ) .
+                                       Xml::label( wfMsg( 'allmessages-filter' ), 'filter' ) .
                                "</td>\n
                                <td class='mw-input'>" .
                                        Xml::radioLabel( wfMsg( 'allmessages-filter-unmodified' ),
@@ -125,7 +125,7 @@ class AllmessagesTablePager extends TablePager {
        var $messages  = NULL;
        var $talkPages = NULL;
 
-       function __construct( $page, $conds, $langObj = NULL ) {
+       function __construct( $page, $conds, $langObj = null ) {
                parent::__construct();
                $this->mIndexField = 'am_title';
                $this->mPage = $page;
@@ -267,9 +267,20 @@ class AllmessagesTablePager extends TablePager {
        }
 
        function getStartBody() {
-               return "<table border=\"1\" class=\"TablePager\" style=\"width:100%;\" id=\"allmessagestable\"><thead>\n<tr>" .
-                       "<th rowspan=\"2\">" . wfMsg('allmessagesname') . "</th><th>" . wfMsg('allmessagesdefault') .
-                       "</tr>\n<tr><th>" . wfMsg('allmessagescurrent') . "</th></tr>\n";
+               return Xml::openElement( 'table', array( 'class' => 'TablePager', 'id' => 'mw-allmessagestable' ) ) . "\n" .
+                       "<tr>
+                               <th rowspan=\"2\">" .
+                                       wfMsg( 'allmessagesname' ) . "
+                               </th>
+                               <th>" .
+                                       wfMsg( 'allmessagesdefault' ) .
+                               "</th>
+                       </tr>\n
+                       <tr>
+                               <th>" .
+                                       wfMsg( 'allmessagescurrent' ) .
+                               "</th>
+                       </tr>\n";
        }
 
        function formatValue( $field , $value ){