324920fa7d1536a231cd0e098b7cf12551cdd8ac
[TYPO3CMS/Extensions/static_info_tables.git] / ext_localconf.php
1 <?php
2 if (!defined ('TYPO3_MODE')) die ('Access denied.');
3
4 if (!defined ('STATIC_INFO_TABLES_EXTkey')) {
5 define('STATIC_INFO_TABLES_EXTkey',$_EXTKEY);
6 }
7
8 if (!defined ('PATH_BE_staticinfotables')) {
9 define('PATH_BE_staticinfotables', t3lib_extMgm::extPath(STATIC_INFO_TABLES_EXTkey));
10 }
11
12 if (!defined ('PATH_BE_staticinfotables_rel')) {
13 define('PATH_BE_staticinfotables_rel', t3lib_extMgm::extRelPath(STATIC_INFO_TABLES_EXTkey));
14 }
15
16 // Unserializing the configuration so we can use it here
17 $_EXTCONF = unserialize($_EXTCONF);
18
19 // Possible label fields for different languages. Default as last.
20 $labelTable = array(
21 'static_territories' => array(
22 'label_fields' => array(
23 'tr_name_##', 'tr_name_en',
24 ),
25 'isocode_field' => array(
26 'tr_iso_##',
27 ),
28 ),
29 'static_countries' => array(
30 'label_fields' => array(
31 'cn_short_##', 'cn_short_en',
32 ),
33 'isocode_field' => array(
34 'cn_iso_##',
35 ),
36 ),
37 'static_country_zones' => array(
38 'label_fields' => array(
39 'zn_name_##', 'zn_name_local',
40 ),
41 'isocode_field' => array(
42 'zn_code', 'zn_country_iso_##',
43 ),
44 ),
45 'static_languages' => array(
46 'label_fields' => array(
47 'lg_name_##', 'lg_name_en',
48 ),
49 'isocode_field' => array(
50 'lg_iso_##', 'lg_country_iso_##',
51 ),
52 ),
53 'static_currencies' => array(
54 'label_fields' => array(
55 'cu_name_##', 'cu_name_en',
56 ),
57 'isocode_field' => array(
58 'cu_iso_##',
59 ),
60 ),
61 );
62
63 if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables']) && is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables'])) {
64 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables'] = array_merge ($labelTable, $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables']);
65 } else {
66 $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables'] = $labelTable;
67 }
68 ?>