Last modified: 2014-02-13 14:15:15 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T63306, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 61306 - Empty reversed diffs
Empty reversed diffs
Status: UNCONFIRMED
Product: MediaWiki
Classification: Unclassified
History/Diffs (Other open bugs)
1.22.0
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-13 09:31 UTC by d3n4ic
Modified: 2014-02-13 14:15 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description d3n4ic 2014-02-13 09:31:18 UTC
When I try use $diffs->reverse(). I'm getting the empty $editors.


function reverse() {
	$rev = $this;
	$rev->edits = array();
	foreach ( $this->edits as $edit ) {
		$rev->edits[] = $edit->reverse();
	}
	return $rev;
}


I suppose that the problem in rewriting $rev->edits by empty array.

$rev = $this;
$rev->edits = array();

My solution:

function reverse() {
	$edits = array();
	foreach ( $this->edits as $edit ) {
		$edits[] = $edit->reverse();
	}
	$this->edits = $edits;
	
	return $this->edits;
}
Comment 1 d3n4ic 2014-02-13 09:32:12 UTC
includes/diff/DairikiDiff.php:683
Comment 2 d3n4ic 2014-02-13 11:12:52 UTC
Also, when we use $diffs->reverse(), TableDiffFormatter doesn't change markers.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links