jenkins-bot has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/350806 )

Change subject: Don’t parse property parameter as string
......................................................................


Don’t parse property parameter as string

If we don’t tell the constraint parameter parser to treat the parameter
as a string, it turns the parameter into a property ID, which results in
the API returning its label in the detailHTML instead of just its P-ID.
In other words, this results in the following change in the detailHTML:

- property: P569; minimum_quantity: 30; maximum_quantity: 150
+ property: date of birth; minimum_quantity: 30; maximum_quantity: 150

(Also, reuse a just-assigned variable instead of copying the
expression.)

Change-Id: Icc4062aaa951fad69fd424dee60330089630aa11
---
M includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
1 file changed, 1 insertion(+), 1 deletion(-)

Approvals:
  jenkins-bot: Verified
  Thiemo Mättig (WMDE): Looks good to me, approved



diff --git a/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php 
b/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
index 250be33..3f39227 100644
--- a/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
+++ b/includes/ConstraintCheck/Checker/DiffWithinRangeChecker.php
@@ -53,7 +53,7 @@
                $property = false;
                if ( array_key_exists( 'property', $constraintParameters ) ) {
                        $property = $constraintParameters['property'];
-                       $parameters['property'] = 
$this->constraintParameterParser->parseSingleParameter( 
$constraintParameters['property'], true );
+                       $parameters['property'] = 
$this->constraintParameterParser->parseSingleParameter( $property );
                }
 
                if ( array_key_exists( 'constraint_status', 
$constraintParameters ) ) {

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

Gerrit-MessageType: merged
Gerrit-Change-Id: Icc4062aaa951fad69fd424dee60330089630aa11
Gerrit-PatchSet: 2
Gerrit-Project: mediawiki/extensions/WikibaseQualityConstraints
Gerrit-Branch: master
Gerrit-Owner: Lucas Werkmeister (WMDE) <[email protected]>
Gerrit-Reviewer: Jonas Kress (WMDE) <[email protected]>
Gerrit-Reviewer: Lucas Werkmeister (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