Index: trunk/extensions/SemanticForms/includes/SF_Utils.inc |
— | — | @@ -12,9 +12,12 @@ |
13 | 13 | static function initProperties() { |
14 | 14 | global $sfgContLang; |
15 | 15 | $sf_props = $sfgContLang->getPropertyLabels(); |
16 | | - SMWPropertyValue::registerProperty('_SF_DF', '__spf', $sf_props[SF_SP_HAS_DEFAULT_FORM], true); |
17 | | - SMWPropertyValue::registerProperty('_SF_AF', '__spf', $sf_props[SF_SP_HAS_ALTERNATE_FORM], true); |
18 | | - SMWPropertyValue::registerProperty('_SF_CP', '__spf', $sf_props[SF_SP_CREATES_PAGES_WITH_FORM], true); |
| 16 | + if (array_key_exists(SF_SP_HAS_DEFAULT_FORM, $sf_props)) |
| 17 | + SMWPropertyValue::registerProperty('_SF_DF', '__spf', $sf_props[SF_SP_HAS_DEFAULT_FORM], true); |
| 18 | + if (array_key_exists(SF_SP_HAS_ALTERNATE_FORM, $sf_props)) |
| 19 | + SMWPropertyValue::registerProperty('_SF_AF', '__spf', $sf_props[SF_SP_HAS_ALTERNATE_FORM], true); |
| 20 | + if (array_key_exists(SF_SP_CREATES_PAGES_WITH_FORM, $sf_props)) |
| 21 | + SMWPropertyValue::registerProperty('_SF_CP', '__spf', $sf_props[SF_SP_CREATES_PAGES_WITH_FORM], true); |
19 | 22 | // also initialize hardcoded English values, if it's a non-English-language wiki |
20 | 23 | SMWPropertyValue::registerProperty('_SF_DF_BACKUP', '__spf', 'Has default form', true); |
21 | 24 | SMWPropertyValue::registerProperty('_SF_AF_BACKUP', '__spf', 'Has alternate form', true); |