Commit e558ac99 authored by Marijn van Wezel's avatar Marijn van Wezel
Browse files

Remove duplicate pre-defined properties

parent 54fbb3af
Pipeline #2957 passed with stages
in 32 seconds
{
"name": "WSSlots",
"version": "2.0.0",
"version": "2.1.0",
"namemsg": "wsslots-extensionname",
"url": "https://wikibase-solutions.com",
"type": "other",
......
......@@ -6,7 +6,6 @@ use CommentStoreComment;
use Content;
use ContentHandler;
use MediaWiki\MediaWikiServices;
use MediaWiki\Revision\SlotRoleRegistry;
use MediaWiki\Storage\SlotRecord;
use MWException;
use RequestContext;
......@@ -224,6 +223,14 @@ abstract class WSSlots {
continue;
}
// Remove any pre-defined properties that exist in both the main semantic data as well as the slot semantic
// data from the main semantic data to prevent them from merging
foreach ( $slotSemanticData->getProperties() as $property ) {
if ( !$property->isUserDefined() ) {
$semanticData->removeProperty( $property );
}
}
$semanticData->importDataFrom( $slotSemanticData );
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment