X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FRevisionList.php;h=1cb43f750131f4f5de7819a0620a072e6dd91b77;hb=7f3037e8ffcaf677e2d22147eea6239703d8aba6;hp=d10b5412cb19d48f09ffb815ef16b178fc0de0ef;hpb=f0edb3e368a5fc69218d20f76f1538b68f37db42;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/RevisionList.php b/includes/RevisionList.php index d10b5412cb..1cb43f7501 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,19 @@ 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 ); + $date = htmlspecialchars( $this->list->getLanguage()->userTimeAndDate( + $this->revision->getTimestamp(), $this->list->getUser() ) ); + if ( $this->isDeleted() && !$this->canViewContent() ) { return $date; } - return Linker::link( + return Linker::linkKnown( $this->list->title, $date, array(), @@ -355,30 +359,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();