Index: trunk/phase3/includes/DifferenceEngine.php |
— | — | @@ -336,8 +336,10 @@ |
337 | 337 | if ( !$this->loadText() ) { |
338 | 338 | wfProfileOut( $fname ); |
339 | 339 | return false; |
340 | | - } else if ( !$this->mOldRev->userCan(Revision::DELETED_TEXT) || !$this->mNewRev->userCan(Revision::DELETED_TEXT) ) { |
| 340 | + } else if ( $this->mOldRev && !$this->mOldRev->userCan(Revision::DELETED_TEXT) ) { |
341 | 341 | return ''; |
| 342 | + } else if ( $this->mNewRev && !$this->mNewRev->userCan(Revision::DELETED_TEXT) ) { |
| 343 | + return ''; |
342 | 344 | } |
343 | 345 | |
344 | 346 | $difftext = $this->generateDiffBody( $this->mOldtext, $this->mNewtext ); |
— | — | @@ -478,10 +480,10 @@ |
479 | 481 | function addHeader( $diff, $otitle, $ntitle, $multi = '' ) { |
480 | 482 | global $wgOut; |
481 | 483 | |
482 | | - if ( !$this->mOldRev->userCan(Revision::DELETED_TEXT) ) { |
| 484 | + if ( $this->mOldRev && $this->mOldRev->isDeleted(Revision::DELETED_TEXT) ) { |
483 | 485 | $otitle = '<span class="history-deleted">'.$otitle.'</span>'; |
484 | 486 | } |
485 | | - if ( !$this->mNewRev->userCan(Revision::DELETED_TEXT) ) { |
| 487 | + if ( $this->mNewRev && $this->mNewRev->isDeleted(Revision::DELETED_TEXT) ) { |
486 | 488 | $ntitle = '<span class="history-deleted">'.$ntitle.'</span>'; |
487 | 489 | } |
488 | 490 | $header = " |
— | — | @@ -610,13 +612,13 @@ |
611 | 613 | } |
612 | 614 | if ( $this->mOldRev ) { |
613 | 615 | // FIXME: permission tests |
614 | | - $this->mOldtext = $this->mOldRev->getText(); |
| 616 | + $this->mOldtext = $this->mOldRev->revText(); |
615 | 617 | if ( $this->mOldtext === false ) { |
616 | 618 | return false; |
617 | 619 | } |
618 | 620 | } |
619 | 621 | if ( $this->mNewRev ) { |
620 | | - $this->mNewtext = $this->mNewRev->getText(); |
| 622 | + $this->mNewtext = $this->mNewRev->revText(); |
621 | 623 | if ( $this->mNewtext === false ) { |
622 | 624 | return false; |
623 | 625 | } |