-
-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Simplify registration for custom fixed property tables
The current approach in `'SMW::SQLStore::updatePropertyTableDefinitions'` requires internal SMW knowledge [0] therefore adding `'SMW::SQLStore::AddCustomFixedPropertyTables'` where only property keys are being assigned and have the builder to figure out all necessary attributes to finalize the table definition. Just add properties like: ``` $properties = array( $propertyRegistry::SCI_CITE_KEY, $propertyRegistry::SCI_CITE_REFERENCE, $propertyRegistry::SCI_CITE_TEXT, $propertyRegistry::SCI_CITE, $propertyRegistry::SCI_DOI ); foreach ( $properties as $property ) { $customFixedProperties[$property] = str_replace( '__', '_', $property ); } ``` Whether `'SMW::SQLStore::updatePropertyTableDefinitions'` should be deprecated in favour of `'SMW::SQLStore::AddCustomFixedPropertyTables'` is not part of this PR. [0] https://github.com/SemanticMediaWiki/SemanticExtraSpecialProperties/blob/master/src/PropertyRegistry.php#L111-L126
- Loading branch information
Showing
4 changed files
with
70 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters