From 4b0f5a2c95b8a6de8b1fe1d0311d943e1d46c993 Mon Sep 17 00:00:00 2001 From: Alexander Opitz Date: Fri, 17 Mar 2017 14:47:19 +0100 Subject: [PATCH] [BUGFIX] Fix mapping after renaming. --- .../BackendTemplateMappingController.php | 52 +++++++++---------- Classes/Module/Cm1/DsEdit.php | 46 ++++++++-------- ext_tables.php | 2 +- 3 files changed, 50 insertions(+), 50 deletions(-) diff --git a/Classes/Controller/BackendTemplateMappingController.php b/Classes/Controller/BackendTemplateMappingController.php index e3ee563ba..742281bd4 100644 --- a/Classes/Controller/BackendTemplateMappingController.php +++ b/Classes/Controller/BackendTemplateMappingController.php @@ -1042,7 +1042,7 @@ public function renderFile() $onCl = 'return top.openUrlInWindow(\'' . GeneralUtility::getIndpEnv('TYPO3_SITE_URL') . $relFilePath . '\',\'FileView\');'; $tRows[] = ' - ' . $this->cshItem('xMOD_tx_templavoila', 'mapping_file', '|') . ' + ' . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_file', '|') . ' ' . TemplaVoilaUtility::getLanguageService()->getLL('templateFile') . ': ' . htmlspecialchars($relFilePath) . ' @@ -1160,13 +1160,13 @@ public function renderFile() $content .= '

' . TemplaVoilaUtility::getLanguageService()->getLL('titleXmlConfiguration') . ':

- ' . $this->cshItem('xMOD_tx_templavoila', 'mapping_file_showXMLDS', '|
') . ' + ' . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_file_showXMLDS', '|
') . '
' . $hlObj->highLight_DS($dataStructureXML) . '
'; break; case 'loadScreen': $content .= '

' . TemplaVoilaUtility::getLanguageService()->getLL('titleLoadDSXml') . '

- ' . $this->cshItem('xMOD_tx_templavoila', 'mapping_file_loadDSXML', '|
') . ' + ' . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_file_loadDSXML', '|
') . '

' . TemplaVoilaUtility::getLanguageService()->getLL('selectTOrecrdToLoadDSFrom') . ':


@@ -1180,7 +1180,7 @@ public function renderFile() case 'saveScreen': $content .= '

' . TemplaVoilaUtility::getLanguageService()->getLL('createDSTO') . ':

- ' . $this->cshItem('xMOD_tx_templavoila', 'mapping_file_createDSTO', '|
') . ' + ' . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_file_createDSTO', '|
') . ' @@ -1252,7 +1252,7 @@ public function renderFile()
' . TemplaVoilaUtility::getLanguageService()->getLL('titleDSTO') . ':
'; $content .= '' - . '

' . $this->cshItem('xMOD_tx_templavoila', 'mapping_file', '|') . TemplaVoilaUtility::getLanguageService()->getLL('buildingDS') . ':

' + . '

' . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_file', '|') . TemplaVoilaUtility::getLanguageService()->getLL('buildingDS') . ':

' . $this->renderTemplateMapper($this->displayFile, $this->displayPath, $dataStruct, $currentMappingInfo, $menuContent); break; } @@ -1293,13 +1293,13 @@ public function renderDSO() ' . implode('', $tRows) . ' @@ -1307,7 +1307,7 @@ public function renderDSO() '; // CSH - $content .= $this->cshItem('xMOD_tx_templavoila', 'mapping_ds'); + $content .= $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_ds'); } else { $content .= '

' . TemplaVoilaUtility::getLanguageService()->getLL('error') . ': ' . TemplaVoilaUtility::getLanguageService()->getLL('noDSDefined') . '

'; } @@ -1359,7 +1359,7 @@ public function renderDSO() '; // CSH - $content .= $this->cshItem('xMOD_tx_templavoila', 'mapping_ds_to'); + $content .= $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_ds_to'); // Display XML of data structure: if (is_array($dataStruct)) { @@ -1375,7 +1375,7 @@ public function renderDSO()

' . TemplaVoilaUtility::getLanguageService()->getLL('renderDSO_XML') . ':

- ' . $this->cshItem('xMOD_tx_templavoila', 'mapping_ds_showXML') . ' + ' . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_ds_showXML') . '

' . BackendUtility::getFuncCheck('', 'SET[showDSxml]', $this->MOD_SETTINGS['showDSxml'], '', GeneralUtility::implodeArrayForUrl('', $_GET, '', 1, 1)) . ' Show XML

' .
                         ($this->MOD_SETTINGS['showDSxml'] ? $hlObj->highLight_DS($dataStructureXML) : '') . '
@@ -1410,7 +1410,7 @@ public function renderTO()
                 $tRows[] =
                     '
' . ''; // Get title and icon: @@ -1514,7 +1514,7 @@ public function renderTO() ''; // Write header of page: @@ -1546,7 +1546,7 @@ public function renderTO() '' . '

' . TemplaVoilaUtility::getLanguageService()->getLL('mappingHeadParts') . ': ' - . $this->cshItem('xMOD_tx_templavoila', 'mapping_to_headerParts') + . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_to_headerParts') . '

' . $this->renderHeaderSelection($theFile, $currentHeaderMappingInfo, $showBodyTag, $editContent); @@ -1884,7 +1884,7 @@ public function renderHeaderSelection($displayFile, $currentHeaderMappingInfo, $ \TYPO3\CMS\Core\Messaging\FlashMessage::WARNING ); - $headerParts .= $this->cshItem('xMOD_tx_templavoila', 'mapping_to_headerParts_buttons') . $htmlAfterDSTable; + $headerParts .= $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_to_headerParts_buttons') . $htmlAfterDSTable; // Return result: return $headerParts; @@ -1969,27 +1969,27 @@ public function renderTemplateMapper($displayFile, $path, $dataStruct = array(),
' . TemplaVoilaUtility::getLanguageService()->getLL('renderDSO_dataElement') . ':' . - $this->cshItem('xMOD_tx_templavoila', 'mapping_head_dataElement') . + $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_head_dataElement') . ' ' . TemplaVoilaUtility::getLanguageService()->getLL('renderDSO_mappingInstructions') . ':' . - $this->cshItem('xMOD_tx_templavoila', 'mapping_head_mapping_instructions') . + $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_head_mapping_instructions') . ' ' . TemplaVoilaUtility::getLanguageService()->getLL('renderDSO_rules') . ':' . - $this->cshItem('xMOD_tx_templavoila', 'mapping_head_Rules') . + $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_head_Rules') . '
' . TemplaVoilaUtility::getLanguageService()->getLL('renderTO_toDetails') . ':' - . $this->cshItem('xMOD_tx_templavoila', 'mapping_to') + . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_to') . '
  ' - . $this->cshItem('xMOD_tx_templavoila', 'mapping_to_modifyDSTO') + . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_to_modifyDSTO') . '
' . ($this->editDataStruct ? '' : '') . '' . ($this->editDataStruct ? '' : '') . '' . implode('', $this->drawDataStructureMap($dataStruct, 1, $currentMappingInfo, $pathLevels, $optDat, $contentSplittedByMapping)) . '
' . TemplaVoilaUtility::getLanguageService()->getLL('mapDataElement') . ':' - . $this->cshItem('xMOD_tx_templavoila', 'mapping_head_dataElement') + . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_head_dataElement') . '' . TemplaVoilaUtility::getLanguageService()->getLL('mapField') . ':' - . $this->cshItem('xMOD_tx_templavoila', 'mapping_head_Field') + . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_head_Field') . '' . (!$this->_preview ? TemplaVoilaUtility::getLanguageService()->getLL('mapInstructions') : TemplaVoilaUtility::getLanguageService()->getLL('mapSampleData')) . '' - . $this->cshItem('xMOD_tx_templavoila', 'mapping_head_' . (!$this->_preview ? 'mapping_instructions' : 'sample_data')) + . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_head_' . (!$this->_preview ? 'mapping_instructions' : 'sample_data')) . '' . TemplaVoilaUtility::getLanguageService()->getLL('mapHTMLpath') . ':' - . $this->cshItem('xMOD_tx_templavoila', 'mapping_head_HTMLpath') + . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_head_HTMLpath') .'' . TemplaVoilaUtility::getLanguageService()->getLL('mapAction') . ':' - . $this->cshItem('xMOD_tx_templavoila', 'mapping_head_Action') + . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_head_Action') . '' . TemplaVoilaUtility::getLanguageService()->getLL('mapRules') . ':' - . $this->cshItem('xMOD_tx_templavoila', 'mapping_head_Rules') + . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_head_Rules') . '' . TemplaVoilaUtility::getLanguageService()->getLL('mapEdit') . ':' - . $this->cshItem('xMOD_tx_templavoila', 'mapping_head_Edit') + . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_head_Edit') . '
' . $htmlAfterDSTable - . $this->cshItem('xMOD_tx_templavoila', 'mapping_basics'); + . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_basics'); // Make mapping window: $limitTags = implode(',', array_keys($this->explodeMappingToTagsStr($this->mappingToTags, 1))); @@ -2000,7 +2000,7 @@ public function renderTemplateMapper($displayFile, $path, $dataStruct = array(),

' . BackendUtility::getFuncMenu('', 'SET[displayMode]', $this->MOD_SETTINGS['displayMode'], $this->MOD_MENU['displayMode'], 'index.php', GeneralUtility::implodeArrayForUrl('', $_GET, '', 1, 1)) - . $this->cshItem('xMOD_tx_templavoila', 'mapping_window_modes') + . $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_window_modes') . '

'; if ($this->_preview) { @@ -2008,7 +2008,7 @@ public function renderTemplateMapper($displayFile, $path, $dataStruct = array(), '
' . TemplaVoilaUtility::getLanguageService()->getLL('mapPreviewInfo') . ':' . - $this->cshItem('xMOD_tx_templavoila', 'mapping_window_help') . + $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_window_help') . '
'; // Add the Iframe: @@ -2277,7 +2277,7 @@ public function drawDataStructureMap($dataStruct, $mappingMode = 0, $currentMapp '; $rowCells['cmdLinks'] .= - $this->cshItem('xMOD_tx_templavoila', 'mapping_modeset'); + $this->cshItem('xMOD_tx_templavoilaplus', 'mapping_modeset'); } else { $rowCells['cmdLinks'] = $this->iconFactory->getIcon('status-dialog-notification', Icon::SIZE_SMALL)->render() . '' . TemplaVoilaUtility::getLanguageService()->getLL('msgHowToMap') . ''; diff --git a/Classes/Module/Cm1/DsEdit.php b/Classes/Module/Cm1/DsEdit.php index ba96995de..096c03e5e 100644 --- a/Classes/Module/Cm1/DsEdit.php +++ b/Classes/Module/Cm1/DsEdit.php @@ -122,20 +122,20 @@ public function drawDataStructureMap_editItem($formPrefix, $key, $value, $level,
-
+
-
'; +
'; if ($insertDataArray['type'] != 'array' && $insertDataArray['type'] != 'section') { $form .= '
-
- ' . $this->pObj->lipsumLink($formFieldName . '[tx_templavoila][sample_data]') . '
+
+ ' . $this->pObj->lipsumLink($formFieldName . '[tx_templavoilaplus][sample_data]') . '
-
'; foreach ($eTypes_formFields as $eType) { $label = htmlspecialchars($eType == 'ce' ? @@ -158,13 +158,13 @@ public function drawDataStructureMap_editItem($formPrefix, $key, $value, $level, $form .= '

' . $this->getLanguageService()->getLL('mapWarningElementChange') . '

'; } $form .= '
-
+
'; if (($insertDataArray['type'] != 'array') && @@ -181,9 +181,9 @@ public function drawDataStructureMap_editItem($formPrefix, $key, $value, $level, $form .= '
-
+
-
+
'; } @@ -234,17 +234,17 @@ public function drawDataStructureMap_editItem($formPrefix, $key, $value, $level,
- - + +
-
+
-
- +
+
'; if ($insertDataArray['tx_templavoilaplus']['eType'] === 'ce') { if (!isset($insertDataArray['tx_templavoilaplus']['oldStyleColumnNumber'])) { @@ -254,7 +254,7 @@ public function drawDataStructureMap_editItem($formPrefix, $key, $value, $level,
' . $this->getLanguageService()->getLL('mapOldStyleColumnNumber') . '

- +
'; @@ -262,7 +262,7 @@ public function drawDataStructureMap_editItem($formPrefix, $key, $value, $level,
- +
'; } $form .= ''; @@ -292,8 +292,8 @@ public function drawDataStructureMap_editItem($formPrefix, $key, $value, $level,
-
- +
+
'; } @@ -357,7 +357,7 @@ public function drawDataStructureMap_editItem($formPrefix, $key, $value, $level,
  • ' . $this->getLanguageService()->getLL('mapTCEform') . '
  • - ' . $this->pObj->cshItem('xMOD_tx_templavoila', 'mapping_editform', '', '', false, 'margin-bottom: 0px;') . ' + ' . $this->pObj->cshItem('xMOD_tx_templavoilaplus', 'mapping_editform', '', '', false, 'margin-bottom: 0px;') . ' @@ -424,7 +424,7 @@ function dsel_menu_reset() { . '' . '' . '' - . $this->pObj->cshItem('xMOD_tx_templavoila', 'mapping_addfield', '', '', false, 'margin-bottom: 0px;') + . $this->pObj->cshItem('xMOD_tx_templavoilaplus', 'mapping_addfield', '', '', false, 'margin-bottom: 0px;') . ''; } } @@ -452,7 +452,7 @@ public function drawDataStructureMap_editItem_editTypeExtra($type, $formFieldNam if (isset($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['cm1']['eTypesExtraFormFields'][$type])) { $_params = array( 'type' => $type, - 'formFieldName' => $formFieldName . '[tx_templavoila][eType_EXTRA]', + 'formFieldName' => $formFieldName . '[tx_templavoilaplus][eType_EXTRA]', 'curValue' => $curValue, ); $output = GeneralUtility::callUserFunction($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['templavoilaplus']['cm1']['eTypesExtraFormFields'][$type], $_params, $this); @@ -466,8 +466,8 @@ public function drawDataStructureMap_editItem_editTypeExtra($type, $formFieldNam ' . $this->getLanguageService()->getLL('mapObjectPath') . ': - - + + diff --git a/ext_tables.php b/ext_tables.php index be3322dd0..b110ca765 100644 --- a/ext_tables.php +++ b/ext_tables.php @@ -76,7 +76,7 @@ 'EXT:templavoilaplus/Resources/Private/Language/locallang_csh_to.xlf' ); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr( - 'xMOD_tx_templavoila', + 'xMOD_tx_templavoilaplus', 'EXT:templavoilaplus/Resources/Private/Language/locallang_csh_module.xlf' ); \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr(