Index: trunk/extensions/DataTransfer/includes/DT_GlobalFunctions.php |
— | — | @@ -7,7 +7,7 @@ |
8 | 8 | |
9 | 9 | if (!defined('MEDIAWIKI')) die(); |
10 | 10 | |
11 | | -define('DT_VERSION','0.3.1'); |
| 11 | +define('DT_VERSION','0.3.2'); |
12 | 12 | |
13 | 13 | // constants for special properties |
14 | 14 | define('DT_SP_HAS_XML_GROUPING', 1); |
— | — | @@ -36,6 +36,7 @@ |
37 | 37 | $wgAutoloadClasses['DTImportJob'] = $dtgIP . '/includes/DT_ImportJob.php'; |
38 | 38 | $wgAutoloadClasses['DTXMLParser'] = $dtgIP . '/includes/DT_XMLParser.php'; |
39 | 39 | $wgHooks['AdminLinks'][] = 'dtfAddToAdminLinks'; |
| 40 | +$wgHooks['smwInitProperties'][] = 'dtfInitProperties'; |
40 | 41 | |
41 | 42 | require_once($dtgIP . '/languages/DT_Language.php'); |
42 | 43 | $wgExtensionMessagesFiles['DataTransfer'] = $dtgIP . '/languages/DT_Messages.php'; |
— | — | @@ -100,6 +101,15 @@ |
101 | 102 | /***** other global helpers *****/ |
102 | 103 | /**********************************************/ |
103 | 104 | |
| 105 | +function dtfInitProperties() { |
| 106 | + global $dtgContLang; |
| 107 | + $dt_props = $dtgContLang->getPropertyLabels(); |
| 108 | + SMWPropertyValue::registerProperty('_DT_XG', '_str', $dt_props[DT_SP_HAS_XML_GROUPING], true); |
| 109 | + // TODO - this should set a "backup" English value as well, |
| 110 | + // so that the phrase "Has XML grouping" works in all languages |
| 111 | + return true; |
| 112 | +} |
| 113 | + |
104 | 114 | /** |
105 | 115 | * Add links to the 'AdminLinks' special page, defined by the Admin Links |
106 | 116 | * extension |