r26143 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r26142‎ | r26143 | r26144 >
Date:07:22, 26 September 2007
Author:raymond
Status:old
Tags:
Comment:
* Fix namespace selection after submit of Special:Newpages
(Xml::namespaceSelector uses === not == as comparison operator)
* Make input form of Special:Newpages a bit nicer for RTL wikis
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/SpecialNewpages.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SpecialNewpages.php
@@ -138,19 +138,38 @@
139139 * @return string
140140 */
141141 function getPageHeader() {
142 - global $wgScript;
 142+ global $wgScript, $wgContLang;
 143+ $align = $wgContLang->isRTL() ? 'left' : 'right';
143144 $self = SpecialPage::getTitleFor( $this->getName() );
144 - $form = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) );
145 - $form .= Xml::hidden( 'title', $self->getPrefixedDBkey() );
146 - # Namespace selector
147 - $form .= '<table><tr><td align="right">' . Xml::label( wfMsg( 'namespace' ), 'namespace' ) . '</td>';
148 - $form .= '<td>' . Xml::namespaceSelector( $this->namespace, 'all' ) . '</td></tr>';
149 - # Username filter
150 - $form .= '<tr><td align="right">' . Xml::label( wfMsg( 'newpages-username' ), 'mw-np-username' ) . '</td>';
151 - $form .= '<td>' . Xml::input( 'username', 30, $this->username, array( 'id' => 'mw-np-username' ) ) . '</td></tr>';
152 -
153 - $form .= '<tr><td></td><td>' . Xml::submitButton( wfMsg( 'allpagessubmit' ) ) . '</td></tr></table>';
154 - $form .= Xml::hidden( 'offset', $this->offset ) . Xml::hidden( 'limit', $this->limit ) . '</form>';
 145+ $form = Xml::openElement( 'form', array( 'method' => 'get', 'action' => $wgScript ) ) .
 146+ Xml::hidden( 'title', $self->getPrefixedDBkey() ) .
 147+ Xml::openElement( 'table' ) .
 148+ "<tr>
 149+ <td align=\"$align\">" .
 150+ Xml::label( wfMsg( 'namespace' ), 'namespace' ) .
 151+ "</td>
 152+ <td>" .
 153+ Xml::namespaceSelector( intval( $this->namespace ), 'all' ) .
 154+ "</td>
 155+ </tr>
 156+ <tr>
 157+ <td align=\"$align\">" .
 158+ Xml::label( wfMsg( 'newpages-username' ), 'mw-np-username' ) .
 159+ "</td>
 160+ <td>" .
 161+ Xml::input( 'username', 30, $this->username, array( 'id' => 'mw-np-username' ) ) .
 162+ "</td>
 163+ </tr>
 164+ <tr>
 165+ <td></td>
 166+ <td>" .
 167+ Xml::submitButton( wfMsg( 'allpagessubmit' ) ) .
 168+ "</td>
 169+ </tr>" .
 170+ Xml::closeElement( 'table' ) .
 171+ Xml::hidden( 'offset', $this->offset ) .
 172+ Xml::hidden( 'limit', $this->limit ) .
 173+ Xml::closeElement( 'form' );
155174 return $form;
156175 }
157176
@@ -209,4 +228,4 @@
210229
211230 if ( ! $npp->doFeed( $wgRequest->getVal( 'feed' ), $limit ) )
212231 $npp->doQuery( $offset, $limit, $shownavigation );
213 -}
\ No newline at end of file
 232+}
Index: trunk/phase3/RELEASE-NOTES
@@ -70,6 +70,8 @@
7171 * (bug 11438) Live Preview chops returned text
7272 * Show the right message on account creation when the user is blocked
7373 * (bug 11450) Fix creation of objectcache table on upgrade
 74+* Fix namespace selection after submit of Special:Newpages
 75+* Make input form of Special:Newpages nicer for RTL wikis
7476
7577
7678 === API changes in 1.12 ===

Follow-up revisions

RevisionCommit summaryAuthorDate
r26257Merged revisions 26134-26247 via svnmerge from...david19:06, 30 September 2007

Status & tagging log