X-Git-Url: https://git.heureux-cyclage.org/?a=blobdiff_plain;f=includes%2Frevisiondelete%2FRevDelArchiveItem.php;h=0f1c7f0c9a2ecc23e00baa19827ddece8c9c2599;hb=c518dd36c54f287a87de607c9c33257a00d31a88;hp=d9aca8873c31dcdc67046b0c644cd2d403dc4728;hpb=3dcf7c09b472ab396a2cc20fe1927bf924969f90;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/revisiondelete/RevDelArchiveItem.php b/includes/revisiondelete/RevDelArchiveItem.php index d9aca8873c..0f1c7f0c9a 100644 --- a/includes/revisiondelete/RevDelArchiveItem.php +++ b/includes/revisiondelete/RevDelArchiveItem.php @@ -25,7 +25,8 @@ class RevDelArchiveItem extends RevDelRevisionItem { public function __construct( $list, $row ) { RevDelItem::__construct( $list, $row ); - $this->revision = Revision::newFromArchiveRow( $row, array( 'page' => $this->list->title->getArticleID() ) ); + $this->revision = Revision::newFromArchiveRow( $row, + array( 'page' => $this->list->title->getArticleID() ) ); } public function getIdField() { @@ -51,20 +52,38 @@ class RevDelArchiveItem extends RevDelRevisionItem { public function setBits( $bits ) { $dbw = wfGetDB( DB_MASTER ); - $dbw->update( 'archive', array( 'ar_deleted' => $bits ), array( 'ar_namespace' => $this->list->title->getNamespace(), 'ar_title' => $this->list->title->getDBkey(), // use timestamp for index - 'ar_timestamp' => $this->row->ar_timestamp, 'ar_rev_id' => $this->row->ar_rev_id, 'ar_deleted' => $this->getBits() ), __METHOD__ ); + $dbw->update( 'archive', + array( 'ar_deleted' => $bits ), + array( + 'ar_namespace' => $this->list->title->getNamespace(), + 'ar_title' => $this->list->title->getDBkey(), + // use timestamp for index + 'ar_timestamp' => $this->row->ar_timestamp, + 'ar_rev_id' => $this->row->ar_rev_id, + 'ar_deleted' => $this->getBits() + ), + __METHOD__ ); - return (bool) $dbw->affectedRows(); + return (bool)$dbw->affectedRows(); } protected function getRevisionLink() { - $date = htmlspecialchars( $this->list->getLanguage()->userTimeAndDate( $this->revision->getTimestamp(), $this->list->getUser() ) ); + $date = htmlspecialchars( $this->list->getLanguage()->userTimeAndDate( + $this->revision->getTimestamp(), $this->list->getUser() ) ); if ( $this->isDeleted() && !$this->canViewContent() ) { return $date; } - return Linker::link( SpecialPage::getTitleFor( 'Undelete' ), $date, array(), array( 'target' => $this->list->title->getPrefixedText(), 'timestamp' => $this->revision->getTimestamp() ) ); + return Linker::link( + SpecialPage::getTitleFor( 'Undelete' ), + $date, + array(), + array( + 'target' => $this->list->title->getPrefixedText(), + 'timestamp' => $this->revision->getTimestamp() + ) + ); } protected function getDiffLink() { @@ -72,6 +91,15 @@ class RevDelArchiveItem extends RevDelRevisionItem { return $this->list->msg( 'diff' )->escaped(); } - return Linker::link( SpecialPage::getTitleFor( 'Undelete' ), $this->list->msg( 'diff' )->escaped(), array(), array( 'target' => $this->list->title->getPrefixedText(), 'diff' => 'prev', 'timestamp' => $this->revision->getTimestamp() ) ); + return Linker::link( + SpecialPage::getTitleFor( 'Undelete' ), + $this->list->msg( 'diff' )->escaped(), + array(), + array( + 'target' => $this->list->title->getPrefixedText(), + 'diff' => 'prev', + 'timestamp' => $this->revision->getTimestamp() + ) + ); } -} \ No newline at end of file +}