jenkins-bot has submitted this change and it was merged.

Change subject: Remove 'comment' from EntityChange::setMetadata validKeys
......................................................................


Remove 'comment' from EntityChange::setMetadata validKeys

Having a comment in this metadata would not do anything

It is simply overwritten inside this method with the
current comment for the object.

So lets just not allow that key...

This is a bit of cleanup before tackaling the main part
of the linked task..

Bug: T108686
Change-Id: I61db00bb9bfb0b9071386bc3c90459ecc59ffd60
---
M lib/includes/changes/EntityChange.php
M lib/tests/phpunit/changes/TestChanges.php
2 files changed, 0 insertions(+), 4 deletions(-)

Approvals:
  Jonas Kress (WMDE): Looks good to me, but someone else must approve
  Thiemo Mättig (WMDE): Looks good to me, but someone else must approve
  Jeroen De Dauw: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/lib/includes/changes/EntityChange.php 
b/lib/includes/changes/EntityChange.php
index 6828a25..5673e52 100644
--- a/lib/includes/changes/EntityChange.php
+++ b/lib/includes/changes/EntityChange.php
@@ -110,7 +110,6 @@
         */
        public function setMetadata( array $metadata ) {
                $validKeys = array(
-                       'comment',
                        'page_id',
                        'bot',
                        'rev_id',
@@ -182,7 +181,6 @@
                        'rev_id' => $rc->getAttribute( 'rc_this_oldid' ),
                        'parent_id' => $rc->getAttribute( 'rc_last_oldid' ),
                        'time' => $rc->getAttribute( 'rc_timestamp' ),
-                       'comment' => '',
                ) );
        }
 
@@ -197,7 +195,6 @@
                        'page_id' => 0,
                        'rev_id' => 0,
                        'parent_id' => 0,
-                       'comment' => '',
                ) );
        }
 
diff --git a/lib/tests/phpunit/changes/TestChanges.php 
b/lib/tests/phpunit/changes/TestChanges.php
index bb38ed3..9435a9f 100644
--- a/lib/tests/phpunit/changes/TestChanges.php
+++ b/lib/tests/phpunit/changes/TestChanges.php
@@ -196,7 +196,6 @@
                                $change->setComment( "$key:1|" );
 
                                $meta = array(
-                                       'comment' => '',
                                        'page_id' => 23,
                                        'bot' => false,
                                        'rev_id' => $rev,

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

Gerrit-MessageType: merged
Gerrit-Change-Id: I61db00bb9bfb0b9071386bc3c90459ecc59ffd60
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/Wikibase
Gerrit-Branch: master
Gerrit-Owner: Addshore <[email protected]>
Gerrit-Reviewer: Aude <[email protected]>
Gerrit-Reviewer: Jeroen De Dauw <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Thiemo Mättig (WMDE) <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to