Index: trunk/extensions/SemanticMediaWiki/includes/SMW_DataValueFactory.php |
— | — | @@ -112,7 +112,7 @@ |
113 | 113 | case SMW_SP_CONVERSION_FACTOR: case SMW_SP_POSSIBLE_VALUE: |
114 | 114 | $result = SMWDataValueFactory::newTypeIDValue('_str', $value, $caption); |
115 | 115 | break; |
116 | | - case SMW_SP_SUBPROPERTY_OF: case SMW_SP_SUBCATEGORY_OF: case SMW_SP_REDIRECTS_TO: |
| 116 | + case SMW_SP_SUBPROPERTY_OF: case SMW_SP_SUBCLASS_OF: case SMW_SP_REDIRECTS_TO: |
117 | 117 | case SMW_SP_INSTANCE_OF: |
118 | 118 | $result = SMWDataValueFactory::newTypeIDValue('_wpg', $value, $caption); |
119 | 119 | break; |
Index: trunk/extensions/SemanticMediaWiki/includes/SMW_GlobalFunctions.php |
— | — | @@ -20,7 +20,7 @@ |
21 | 21 | define('SMW_SP_POSSIBLE_VALUE', 14); |
22 | 22 | define('SMW_SP_REDIRECTS_TO', 15); |
23 | 23 | define('SMW_SP_SUBPROPERTY_OF',17); |
24 | | -define('SMW_SP_SUBCATEGORY_OF',18); |
| 24 | +define('SMW_SP_SUBCLASS_OF',18); |
25 | 25 | |
26 | 26 | // old names, will be removed *two* releases after given version |
27 | 27 | // SMW 1.1.1 |
— | — | @@ -300,6 +300,9 @@ |
301 | 301 | $dv = SMWDataValueFactory::newSpecialValue(SMW_SP_INSTANCE_OF); |
302 | 302 | $dv->setValues($name,NS_CATEGORY); |
303 | 303 | SMWFactbox::$semdata->addSpecialValue(SMW_SP_INSTANCE_OF,$dv); |
| 304 | + if (SMWFactbox::$semdata->getSubject()->getNamespace() == NS_CATEGORY) { |
| 305 | + SMWFactbox::$semdata->addSpecialValue(SMW_SP_SUBCLASS_OF,$dv); |
| 306 | + } |
304 | 307 | } |
305 | 308 | return true; |
306 | 309 | } |