From: Matthew Flaschen Date: Thu, 19 May 2016 21:10:35 +0000 (-0400) Subject: RevDel: Fix ChangeTags for archived items X-Git-Tag: 1.31.0-rc.0~6838 X-Git-Url: http://git.cyclocoop.org/%7B%24www_url%7Dadmin/membres/fiche.php?a=commitdiff_plain;h=77884372c011d91bc2f24ee4ef68b5a93dc35edb;p=lhc%2Fweb%2Fwiklou.git RevDel: Fix ChangeTags for archived items Bug: T128980 Change-Id: Ibc9ec57da16e1b71c9efa0d2c062f8d7965f59bc --- diff --git a/includes/revisiondelete/RevDelArchiveList.php b/includes/revisiondelete/RevDelArchiveList.php index 9bb1dc5011..72c460e0db 100644 --- a/includes/revisiondelete/RevDelArchiveList.php +++ b/includes/revisiondelete/RevDelArchiveList.php @@ -41,15 +41,32 @@ class RevDelArchiveList extends RevDelRevisionList { $timestamps[] = $db->timestamp( $id ); } - return $db->select( 'archive', Revision::selectArchiveFields(), - [ - 'ar_namespace' => $this->title->getNamespace(), - 'ar_title' => $this->title->getDBkey(), - 'ar_timestamp' => $timestamps - ], - __METHOD__, - [ 'ORDER BY' => 'ar_timestamp DESC' ] - ); + $tables = [ 'archive' ]; + $fields = Revision::selectArchiveFields(); + $conds = [ + 'ar_namespace' => $this->title->getNamespace(), + 'ar_title' => $this->title->getDBkey(), + 'ar_timestamp' => $timestamps, + ]; + $join_conds = []; + $options = [ 'ORDER BY' => 'ar_timestamp DESC' ]; + + ChangeTags::modifyDisplayQuery( + $tables, + $fields, + $conds, + $join_conds, + $options, + '' + ); + + return $db->select( $tables, + $fields, + $conds, + __METHOD__, + $options, + $join_conds + ); } public function newItem( $row ) { diff --git a/includes/revisiondelete/RevDelRevisionList.php b/includes/revisiondelete/RevDelRevisionList.php index bc2b2e9022..27e5148611 100644 --- a/includes/revisiondelete/RevDelRevisionList.php +++ b/includes/revisiondelete/RevDelRevisionList.php @@ -94,13 +94,33 @@ class RevDelRevisionList extends RevDelList { return $live; } - // Check if any requested revisions are available fully deleted. - $archived = $db->select( [ 'archive' ], Revision::selectArchiveFields(), - [ - 'ar_rev_id' => $ids + $archiveQueryInfo = [ + 'tables' => [ 'archive' ], + 'fields' => Revision::selectArchiveFields(), + 'conds' => [ + 'ar_rev_id' => $ids, ], + 'options' => [ 'ORDER BY' => 'ar_rev_id DESC' ], + 'join_conds' => [], + ]; + + ChangeTags::modifyDisplayQuery( + $archiveQueryInfo['tables'], + $archiveQueryInfo['fields'], + $archiveQueryInfo['conds'], + $archiveQueryInfo['join_conds'], + $archiveQueryInfo['options'], + '' + ); + + // Check if any requested revisions are available fully deleted. + $archived = $db->select( + $archiveQueryInfo['tables'], + $archiveQueryInfo['fields'], + $archiveQueryInfo['conds'], __METHOD__, - [ 'ORDER BY' => 'ar_rev_id DESC' ] + $archiveQueryInfo['options'], + $archiveQueryInfo['join_conds'] ); if ( $archived->numRows() == 0 ) {