Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add SMW_NS_RULE ns, refs 2273 #3019

Merged
merged 1 commit into from
Feb 18, 2018
Merged

Add SMW_NS_RULE ns, refs 2273 #3019

merged 1 commit into from
Feb 18, 2018

Conversation

mwjames
Copy link
Contributor

@mwjames mwjames commented Feb 18, 2018

This PR is made in reference to: #2273

This PR addresses or contains:

  • This is a minimal framework that allows to define a rule set and rule interpreter (out of scope for this PR). For now it has been stripped form its original implementation to only contain a bare bone to manage a rule type, its definition, and representation (as I require a structureable content type for a different PR and using the MediaWiki NS was a non starter).
  • A rule page can only be edited by someone with the smw-ruleedit right (smwcurator role has the right)
  • Rule types are registered with $smwgRuleTypes
  • I consider this experimental

A rule definition and its content page will look like

image

If the content violates the schema then the user will be notified with something that appears as

image

This PR includes:

  • Tests (unit/integration)
  • CI build passed

Fixes #

@mwjames mwjames added this to the SMW 3.0.0 milestone Feb 18, 2018
@mwjames mwjames merged commit dc881e9 into master Feb 18, 2018
@mwjames mwjames deleted the rule-ns branch February 18, 2018 12:14
@kghbln kghbln added enhancement Alters an existing functionality or behaviour wikidocu missing Code changes (mostly features) what have not yet been documented labels Feb 18, 2018
This was referenced Feb 18, 2018
@kghbln kghbln mentioned this pull request Feb 20, 2018
2 tasks
@@ -128,18 +136,14 @@ public static function buildNamespaceIndex( $offset ) {
'SF_NS_FORM_TALK' => $offset + 7,
'SMW_NS_CONCEPT' => $offset + 8,
'SMW_NS_CONCEPT_TALK' => $offset + 9,
'SMW_NS_RULE' => $offset + 10,
Copy link
Member

@kghbln kghbln May 12, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mwjames I suggest to adapt the offset for SMW_NS_RULE and SMW_NS_RULE_TALK to +12 and +13 respectively since the current indexes conflict with the DPLforum extension which uses them for ages, too. While we all agree that chances are low that both extensions will be installed a the same time we cannot rule this out entirely. Moreover Wikia is the most prominent user of DPLforum and I believe it will be nice to avoid potential worries from the start since you never know.

@kghbln
Copy link
Member

kghbln commented Mar 20, 2020

The special properties are finally documented:

Also: schema-edit permission.

@kghbln kghbln removed the wikidocu missing Code changes (mostly features) what have not yet been documented label Mar 20, 2020
@krabina
Copy link
Contributor

krabina commented Nov 1, 2022

note: in the examples above, LINK_FORMAT_RULE must be changed to LINK_FORMAT_SCHEMA

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Alters an existing functionality or behaviour
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants