* fix bug 7930: return the resulting selected array in the methods buildStaticInfoSel...
[TYPO3CMS/Extensions/static_info_tables.git] / ext_localconf.php
index 5d97acc..09d35ec 100644 (file)
@@ -24,9 +24,13 @@ if (t3lib_extMgm::isLoaded(DIV_EXTkey)) {
        }
 }
 
-$TYPO3_CONF_VARS['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['charset'] = 'utf-8';
+$_EXTCONF = unserialize($_EXTCONF);    // unserializing the configuration so we can use it here:
 
-$TYPO3_CONF_VARS['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables'] = array(
+if (!isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['charset']))      {
+       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['charset'] = $_EXTCONF['charset'] ? $_EXTCONF['charset'] : 'utf-8';
+}
+
+$labelTable = array(
        'static_territories' => array(
                'label_fields' => array(        // possible label fields for different languages. Default as last.
                        'tr_name_##', 'tr_name_en',
@@ -67,16 +71,24 @@ $TYPO3_CONF_VARS['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables'] = array(
                        'cu_iso_##',
                ),
        ),
-       'static_taxes' => array(
+       'static_markets' => array(
                'label_fields' => array(
-                       'tx_name_##', 'tx_name_en',
+                       'institution_description',
                ),
                'isocode_field' => array(
-                       'tx_code', 'tx_country_iso_##', 'tx_zn_code',
+                       'institution_description',
                ),
        ),
 );
 
+
+if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables']) && is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables']))       {
+
+       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables'] = array_merge ($labelTable, $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables']);
+} else {
+       $GLOBALS['TYPO3_CONF_VARS']['EXTCONF'][STATIC_INFO_TABLES_EXTkey]['tables'] = $labelTable;
+}
+
 require_once(t3lib_extMgm::extPath(STATIC_INFO_TABLES_EXTkey).'class.tx_staticinfotables_div.php');
 
 ?>
\ No newline at end of file