X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=includes%2FRevisionList.php;h=e4174730d1b487d2e2d5eca02bf525fffd08a2e7;hb=87eebf8dd5ec4564aa1cfca4fe7e53fbd29da3d5;hp=d10b5412cb19d48f09ffb815ef16b178fc0de0ef;hpb=27f8aa732e55f0655255152fa22655fa07424c2d;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/RevisionList.php b/includes/RevisionList.php index d10b5412cb..e4174730d1 100644 --- a/includes/RevisionList.php +++ b/includes/RevisionList.php @@ -30,6 +30,7 @@ abstract class RevisionListBase extends ContextSource { /** @var array */ protected $ids; + /** @var ResultWrapper|bool */ protected $res; /** @var bool|object */ @@ -317,7 +318,7 @@ class RevisionItem extends RevisionItemBase { } public function getAuthorNameField() { - return 'user_name'; // see Revision::selectUserFields() + return 'rev_user_text'; } public function canView() { @@ -334,15 +335,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 +360,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();