r57288 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r57287‎ | r57288 | r57289 >
Date:12:18, 2 October 2009
Author:raymond
Status:ok
Tags:
Comment:
* Bug 20944: Align revision delete button left for RTL wikis.
* Add a class to the button
Modified paths:
  • /trunk/phase3/includes/HistoryPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/HistoryPage.php
@@ -340,7 +340,7 @@
341341 * @return string HTML output
342342 */
343343 function getStartBody() {
344 - global $wgScript, $wgEnableHtmlDiff, $wgUser, $wgOut;
 344+ global $wgScript, $wgEnableHtmlDiff, $wgUser, $wgOut, $wgContLang;
345345 $this->lastRow = false;
346346 $this->counter = 1;
347347 $this->oldIdChecked = 0;
@@ -352,12 +352,14 @@
353353
354354 $this->buttons = '<div>';
355355 if( $wgUser->isAllowed('deletedhistory') ) {
 356+ $float = $wgContLang->isRTL() ? 'left' : 'right';
356357 $this->buttons .= Xml::element( 'button',
357358 array(
358359 'type' => 'submit',
359360 'name' => 'action',
360361 'value' => 'revisiondelete',
361 - 'style' => 'float: right',
 362+ 'style' => "float: $float;",
 363+ 'class' => 'mw-history-revisiondelete-button',
362364 ),
363365 wfMsg( 'showhideselectedversions' )
364366 ) . "\n";

Follow-up revisions

RevisionCommit summaryAuthorDate
r57429Cleanup for r57288: use $wgContLang->alignEnd() instead of the isRtl() ? 'lef...brion18:54, 6 October 2009

Status & tagging log