Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Search entities in all entity namespaces
Instead of assuming that all entities are in namespace 0 (which is only true in a Wikidata-like installation, but not in a default Wikibase installation, and even then only for items, not properties), use all entity namespaces from the local configuration. (Use array_values to make the keys numeric to make sure the database wrapper doesn’t try to interpret the string keys ('item', 'property').) Also, if we can’t find the entity, throw an exception instead of returning count 0: it’s better to fail the import than to duplicate statements. Fixes #22.
- Loading branch information