Index: trunk/phase3/includes/api/ApiQueryRevisions.php |
— | — | @@ -346,7 +346,14 @@ |
347 | 347 | $newText = explode("\n", $wgContLang->segmentForDiff($text)); |
348 | 348 | $diff = new Diff($this->diffOldText, $newText); |
349 | 349 | $vals['diffto']['from'] = $this->diffto; |
350 | | - ApiResult::setContent($vals['diffto'], $wgContLang->unsegmentForDiff($this->formatter->format($diff))); |
| 350 | + $arraydiff = $this->formatter instanceof ArrayDiffFormatter; |
| 351 | + if( $arraydiff ) { |
| 352 | + $changes = $wgContLang->unsegmentForDiff($this->formatter->format($diff)); |
| 353 | + $this->getResult()->setIndexedTagName( $changes, 'change' ); |
| 354 | + $vals['diffto'] = $changes; |
| 355 | + } else { |
| 356 | + ApiResult::setContent($vals['diffto'], $wgContLang->unsegmentForDiff($this->formatter->format($diff))); |
| 357 | + } |
351 | 358 | } |
352 | 359 | if($this->difftoprev) |
353 | 360 | // Cache the revision's content for later use |
Index: trunk/phase3/includes/DifferenceEngine.php |
— | — | @@ -1742,7 +1742,7 @@ |
1743 | 1743 | $retval[] = array( |
1744 | 1744 | 'action' => 'change', |
1745 | 1745 | 'old' => $l, |
1746 | | - 'new' => $edit->closing[$i], |
| 1746 | + 'new' => @$edit->closing[$i], |
1747 | 1747 | 'oldline' => $oldline++, |
1748 | 1748 | 'newline' => $newline++, |
1749 | 1749 | ); |