Page MenuHomePhabricator

ApiBlockInfoTrait should indicate the type of the block
Open, Needs TriagePublic

Description

Currently, ApiBlockInfoTrait::getBlockDetails() gives identical looking information for a local and a global block. Since the information includes the database ID, it really should specify which database the ID is for, ie. there should be some sort of block type field.

This would probably require adding a type field to the Block interface.

Event Timeline

Another use case for a type field in Block is that BlockManager::getUniqueBlocks() would deduplicate any two blocks which return the same ID, even if e.g. one is a local block and the other is a global block.