Merge "Fix indenting and newlines"
[lhc/web/wiklou.git] / includes / specials / SpecialUndelete.php
index 15b8054..6a01b0c 100644 (file)
@@ -347,7 +347,13 @@ class SpecialUndelete extends SpecialPage {
                                );
                        }
                        $revs = $this->msg( 'undeleterevisions' )->numParams( $row->count )->parse();
-                       $out->addHTML( "<li class='undeleteResult'>{$item} ({$revs})</li>\n" );
+                       $out->addHTML(
+                               Html::rawElement(
+                                       'li',
+                                       [ 'class' => 'undeleteResult' ],
+                                       "{$item} ({$revs})"
+                               )
+                       );
                }
                $result->free();
                $out->addHTML( "</ul>\n" );
@@ -549,15 +555,9 @@ class SpecialUndelete extends SpecialPage {
                $diffContext->setWikiPage( WikiPage::factory( $currentRev->getTitle() ) );
 
                $diffEngine = $currentRev->getContentHandler()->createDifferenceEngine( $diffContext );
+               $diffEngine->setRevisions( $previousRev->getRevisionRecord(), $currentRev->getRevisionRecord() );
                $diffEngine->showDiffStyle();
-
-               $formattedDiff = $diffEngine->generateContentDiffBody(
-                       $previousRev->getContent( Revision::FOR_THIS_USER, $this->getUser() ),
-                       $currentRev->getContent( Revision::FOR_THIS_USER, $this->getUser() )
-               );
-
-               $formattedDiff = $diffEngine->addHeader(
-                       $formattedDiff,
+               $formattedDiff = $diffEngine->getDiff(
                        $this->diffHeader( $previousRev, 'o' ),
                        $this->diffHeader( $currentRev, 'n' )
                );