Page MenuHomePhabricator

[Task] Use settings instead of constants for Wikidata property and item ids
Closed, DeclinedPublic

Description

In the setup file (WikibaseQualityExternalValidation.php) some constants are set for several Wikidata property and item ids.

To make this configurable (e.g. for test.wikidata), it would be nicer imho if these were settings.

// Ids of certain Wikidata entities                                                             
if( !defined( 'INSTANCE_OF_PID' ) ) {                                                           
    define( 'INSTANCE_OF_PID', 'P31' );                                                         
}                                                                                               
if( !defined( 'IDENTIFIER_PROPERTY_QID' ) ) {                                                   
    define( 'IDENTIFIER_PROPERTY_QID', 'Q19847637' );                                           
}                                                                                               
if( !defined( 'STATED_IN_PID' ) ) {                                                             
    define( 'STATED_IN_PID', 'P248' );                                                          
}

Event Timeline

aude raised the priority of this task from to Medium.
aude updated the task description. (Show Details)
aude added a subscriber: aude.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Lydia_Pintscher renamed this task from Use settings instead of constants for Wikidata property and item ids to [Task] Use settings instead of constants for Wikidata property and item ids.Sep 22 2015, 11:41 AM
Lydia_Pintscher set Security to None.
Lydia_Pintscher moved this task from incoming to ready to go on the Wikidata board.

argh... once again wasted time figuring out why the special page didn't work on my wiki only to run into this issue again. :(

I set defines for these before i include external validation. this causes problems with the tests, since some of the tests expect the default define values. (and wasted yet more time to debug this, that these particular failures have nothing to do with data type changes)