r78889 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r78888‎ | r78889 | r78890 >
Date:15:03, 23 December 2010
Author:happy-melon
Status:reverted
Tags:
Comment:
Follow-up r78865 CR; restore arrow helper functions, fixing fatal on TWN.
Modified paths:
  • /trunk/phase3/includes/ChangesList.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/ChangesList.php
@@ -811,9 +811,9 @@
812812
813813 $tl = "<span class='collapsible-expander'>"
814814 . "<span class='mw-rc-openarrow'>"
815 - . "<a href='#' title='$expandTitle'>{$this->arrow( 'd', '-', wfMsg( 'rc-enhanced-hide' ) )}</a>"
 815+ . "<a href='#' title='$expandTitle'>{$this->sideArrow()}</a>"
816816 . "</span><span class='mw-rc-closearrow'>"
817 - . "<a href='#' title='$closeTitle'>{$this->arrow( 'd', '-', wfMsg( 'rc-enhanced-hide' ) )}</a>"
 817+ . "<a href='#' title='$closeTitle'>{$this->downArrow()}</a>"
818818 . "</span></span>";
819819 $r .= "<td>$tl</td>";
820820
@@ -1014,6 +1014,34 @@
10151015 }
10161016
10171017 /**
 1018+ * Generate HTML for a right- or left-facing arrow,
 1019+ * depending on language direction.
 1020+ * @return String: HTML <img> tag
 1021+ */
 1022+ protected function sideArrow() {
 1023+ global $wgContLang;
 1024+ $dir = $wgContLang->isRTL() ? 'l' : 'r';
 1025+ return $this->arrow( $dir, '+', wfMsg( 'rc-enhanced-expand' ) );
 1026+ }
 1027+
 1028+ /**
 1029+ * Generate HTML for a down-facing arrow
 1030+ * depending on language direction.
 1031+ * @return String: HTML <img> tag
 1032+ */
 1033+ protected function downArrow() {
 1034+ return $this->arrow( 'd', '-', wfMsg( 'rc-enhanced-hide' ) );
 1035+ }
 1036+
 1037+ /**
 1038+ * Generate HTML for a spacer image
 1039+ * @return String: HTML <img> tag
 1040+ */
 1041+ protected function spacerArrow() {
 1042+ return $this->arrow( '', codepointToUtf8( 0xa0 ) ); // non-breaking space
 1043+ }
 1044+
 1045+ /**
10181046 * Enhanced RC ungrouped line.
10191047 * @return String: a HTML formated line (generated using $r)
10201048 */
@@ -1038,7 +1066,7 @@
10391067 $r = Html::openElement( 'table', array( 'class' => $classes ) ) .
10401068 Html::openElement( 'tr' );
10411069
1042 - $r .= '<td class="mw-enhanced-rc">' . $this->arrow( '', codepointToUtf8( 0xa0 ) );
 1070+ $r .= '<td class="mw-enhanced-rc">' . $this->spacerArrow();
10431071 # Flag and Timestamp
10441072 if( $rc_type == RC_MOVE || $rc_type == RC_MOVE_OVER_REDIRECT ) {
10451073 $r .= '&#160;&#160;&#160;&#160;'; // 4 flags -> 4 spaces

Follow-up revisions

RevisionCommit summaryAuthorDate
r78987Reverting r78889 and r78865. Breaks changeslist on translatewiki (unpatrolled...krinkle00:29, 25 December 2010

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r78865(bug 17456) implement CollapsibleTables in core javascript. Using ResourceLo...happy-melon00:06, 23 December 2010

Status & tagging log