r47771 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r47770‎ | r47771 | r47772 >
Date:23:17, 24 February 2009
Author:aaron
Status:ok (Comments)
Tags:
Comment:
Bug 17241 The diffonly URI parameter should cascade to "Next edit" and "Previous edit" diff links
Modified paths:
  • /trunk/phase3/includes/diff/DifferenceEngine.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/diff/DifferenceEngine.php
@@ -208,14 +208,21 @@
209209 $patrol = '';
210210 }
211211
 212+ $diffOnlyArg = '';
 213+ # Carry over 'diffonly' param via navigation links
 214+ if( $diffOnly != $wgUser->getBoolOption('diffonly') ) {
 215+ $diffOnlyArg = '&diffonly='.$diffOnly;
 216+ }
212217 $htmldiffarg = $this->htmlDiffArgument();
 218+ # Make "previous revision link"
213219 $prevlink = $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'previousdiff' ),
214 - 'diff=prev&oldid='.$this->mOldid.$htmldiffarg, '', '', 'id="differences-prevlink"' );
215 - if ( $this->mNewRev->isCurrent() ) {
 220+ "diff=prev&oldid={$this->mOldid}{$htmldiffarg}{$diffOnlyArg}", '', '', 'id="differences-prevlink"' );
 221+ # Make "next revision link"
 222+ if( $this->mNewRev->isCurrent() ) {
216223 $nextlink = ' ';
217224 } else {
218225 $nextlink = $sk->makeKnownLinkObj( $this->mTitle, wfMsgHtml( 'nextdiff' ),
219 - 'diff=next&oldid='.$this->mNewid.$htmldiffarg, '', '', 'id="differences-nextlink"' );
 226+ "diff=next&oldid={$this->mNewid}{$htmldiffarg}{$diffOnlyArg}", '', '', 'id="differences-nextlink"' );
220227 }
221228
222229 $oldminor = '';

Follow-up revisions

RevisionCommit summaryAuthorDate
r48807release note lines for r47771, r47773, r47776brion11:47, 25 March 2009

Comments

#Comment by Werdna (talk | contribs)   23:19, 24 February 2009
-			'diff=prev&oldid='.$this->mOldid.$htmldiffarg, , , 'id="differences-prevlink"' );

Ewwwww. Can we use $sk->link with a nice associative array of URL parameters nao? :)

Status & tagging log