[MediaWiki-commits] [Gerrit] RevDel: Fix ChangeTags for archived items - change (mediawiki/core)
jenkins-bot has submitted this change and it was merged. Change subject: RevDel: Fix ChangeTags for archived items .. RevDel: Fix ChangeTags for archived items Bug: T128980 Change-Id: Ibc9ec57da16e1b71c9efa0d2c062f8d7965f59bc --- M includes/revisiondelete/RevDelArchiveList.php M includes/revisiondelete/RevDelRevisionList.php 2 files changed, 51 insertions(+), 14 deletions(-) Approvals: Umherirrender: Looks good to me, approved jenkins-bot: Verified diff --git a/includes/revisiondelete/RevDelArchiveList.php b/includes/revisiondelete/RevDelArchiveList.php index 9bb1dc5..72c460e 100644 --- a/includes/revisiondelete/RevDelArchiveList.php +++ b/includes/revisiondelete/RevDelArchiveList.php @@ -41,15 +41,32 @@ $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 bc2b2e9..27e5148 100644 --- a/includes/revisiondelete/RevDelRevisionList.php +++ b/includes/revisiondelete/RevDelRevisionList.php @@ -94,13 +94,33 @@ 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 ) { -- To view, visit https://gerrit.wikimedia.org/r/289756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: Ibc9ec57da16e1b71c9efa0d2c062f8d7965f59bc Gerrit-PatchSet: 2 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: MattflaschenGerrit-Reviewer: Catrope Gerrit-Reviewer: Florianschmidtwelzow Gerrit-Reviewer: Matthias Mullie Gerrit-Reviewer: Umherirrender Gerrit-Reviewer: jenkins-bot <> ___ MediaWiki-commits mailing
[MediaWiki-commits] [Gerrit] RevDel: Fix ChangeTags for archived items - change (mediawiki/core)
Mattflaschen has uploaded a new change for review. https://gerrit.wikimedia.org/r/289756 Change subject: RevDel: Fix ChangeTags for archived items .. RevDel: Fix ChangeTags for archived items Bug: T128980 Change-Id: Ibc9ec57da16e1b71c9efa0d2c062f8d7965f59bc --- M includes/revisiondelete/RevDelArchiveList.php M includes/revisiondelete/RevDelRevisionList.php 2 files changed, 51 insertions(+), 14 deletions(-) git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/56/289756/1 diff --git a/includes/revisiondelete/RevDelArchiveList.php b/includes/revisiondelete/RevDelArchiveList.php index 9bb1dc5..72c460e 100644 --- a/includes/revisiondelete/RevDelArchiveList.php +++ b/includes/revisiondelete/RevDelArchiveList.php @@ -41,15 +41,32 @@ $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 bc2b2e9..27e5148 100644 --- a/includes/revisiondelete/RevDelRevisionList.php +++ b/includes/revisiondelete/RevDelRevisionList.php @@ -94,13 +94,33 @@ 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 ) { -- To view, visit https://gerrit.wikimedia.org/r/289756 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: newchange Gerrit-Change-Id: Ibc9ec57da16e1b71c9efa0d2c062f8d7965f59bc Gerrit-PatchSet: 1 Gerrit-Project: mediawiki/core Gerrit-Branch: master Gerrit-Owner: Mattflaschen___ MediaWiki-commits mailing list MediaWiki-commits@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits