* @private
*/
var $mOldid, $mNewid;
+ /**
+ * @var Content
+ */
var $mOldContent, $mNewContent;
protected $mDiffLang;
if ( $samePage && $this->mNewPage->quickUserCan( 'edit', $user ) ) {
if ( $this->mNewRev->isCurrent() && $this->mNewPage->userCan( 'rollback', $user ) ) {
- $out->preventClickjacking();
- $rollback = '   ' . Linker::generateRollback( $this->mNewRev, $this->getContext() );
+ $rollbackLink = Linker::generateRollback( $this->mNewRev, $this->getContext() );
+ if ( $rollbackLink ) {
+ $out->preventClickjacking();
+ $rollback = '   ' . $rollbackLink;
+ }
}
if ( !$this->mOldRev->isDeleted( Revision::DELETED_TEXT ) && !$this->mNewRev->isDeleted( Revision::DELETED_TEXT ) ) {
$undoLink = ' ' . $this->msg( 'parentheses' )->rawParams(
/**
* Get complete diff table, including header
*
- * @param $otitle Title: old title
- * @param $ntitle Title: new title
+ * @param string|bool $otitle Header for old text or false
+ * @param string|bool $ntitle Header for new text or false
* @param $notice String: HTML between diff header and body
* @return mixed
*/