Mailing List Archive

[MediaWiki-commits] [Gerrit] mediawiki/core[master]: Use array_merge in RevisionStore::getArchiveQueryInfo
Addshore has uploaded a new change for review. ( https://gerrit.wikimedia.org/r/406141 )

Change subject: Use array_merge in RevisionStore::getArchiveQueryInfo
......................................................................

Use array_merge in RevisionStore::getArchiveQueryInfo

[ 'foo' ] + [ 'bar' ] = [ 'foo' ] which is incorrect.

Change-Id: I5cb0926b7f0eb91c8864a17791a452965eb29d7e
---
M includes/Storage/RevisionStore.php
1 file changed, 4 insertions(+), 3 deletions(-)


git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core refs/changes/41/406141/1

diff --git a/includes/Storage/RevisionStore.php b/includes/Storage/RevisionStore.php
index 79ecec6..87d6f68 100644
--- a/includes/Storage/RevisionStore.php
+++ b/includes/Storage/RevisionStore.php
@@ -1639,9 +1639,10 @@
*/
public function getArchiveQueryInfo() {
$commentQuery = CommentStore::newKey( 'ar_comment' )->getJoin();
+
$ret = [
- 'tables' => [ 'archive' ] + $commentQuery['tables'],
- 'fields' => [
+ 'tables' => array_merge( [ 'archive' ], $commentQuery['tables'] ),
+ 'fields' => array_merge( [.
'ar_id',
'ar_page_id',
'ar_namespace',
@@ -1657,7 +1658,7 @@
'ar_len',
'ar_parent_id',
'ar_sha1',
- ] + $commentQuery['fields'],
+ ], $commentQuery['fields'] ),
'joins' => $commentQuery['joins'],
];


--
To view, visit https://gerrit.wikimedia.org/r/406141
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I5cb0926b7f0eb91c8864a17791a452965eb29d7e
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Addshore <addshorewiki@gmail.com>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits