From f6d65e533c62f6deb21342d4901ece24497b433e Mon Sep 17 00:00:00 2001 From: Pierre Schmitz Date: Thu, 4 Jun 2015 07:31:04 +0200 Subject: Update to MediaWiki 1.25.1 --- includes/RevisionList.php | 27 +++++++++++++++++---------- 1 file changed, 17 insertions(+), 10 deletions(-) (limited to 'includes/RevisionList.php') diff --git a/includes/RevisionList.php b/includes/RevisionList.php index d10b5412..6844dadc 100644 --- a/includes/RevisionList.php +++ b/includes/RevisionList.php @@ -317,7 +317,7 @@ class RevisionItem extends RevisionItemBase { } public function getAuthorNameField() { - return 'user_name'; // see Revision::selectUserFields() + return 'rev_user_text'; } public function canView() { @@ -334,15 +334,18 @@ class RevisionItem extends RevisionItemBase { /** * Get the HTML link to the revision text. - * Overridden by RevDelArchiveItem. + * @todo Essentially a copy of RevDelRevisionItem::getRevisionLink. That class + * should inherit from this one, and implement an appropriate interface instead + * of extending RevDelItem * @return string */ protected function getRevisionLink() { $date = $this->list->getLanguage()->timeanddate( $this->revision->getTimestamp(), true ); + if ( $this->isDeleted() && !$this->canViewContent() ) { return $date; } - return Linker::link( + return Linker::linkKnown( $this->list->title, $date, array(), @@ -355,30 +358,34 @@ class RevisionItem extends RevisionItemBase { /** * Get the HTML link to the diff. - * Overridden by RevDelArchiveItem + * @todo Essentially a copy of RevDelRevisionItem::getDiffLink. That class + * should inherit from this one, and implement an appropriate interface instead + * of extending RevDelItem * @return string */ protected function getDiffLink() { if ( $this->isDeleted() && !$this->canViewContent() ) { return $this->context->msg( 'diff' )->escaped(); } else { - return Linker::link( + return Linker::linkKnown( $this->list->title, - $this->context->msg( 'diff' )->escaped(), + $this->list->msg( 'diff' )->escaped(), array(), array( 'diff' => $this->revision->getId(), 'oldid' => 'prev', 'unhide' => 1 - ), - array( - 'known', - 'noclasses' ) ); } } + /** + * @todo Essentially a copy of RevDelRevisionItem::getHTML. That class + * should inherit from this one, and implement an appropriate interface instead + * of extending RevDelItem + * @return string + */ public function getHTML() { $difflink = $this->context->msg( 'parentheses' ) ->rawParams( $this->getDiffLink() )->escaped(); -- cgit v1.2.2