[TASK] Cleanup impexp 34/18034/2
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 5 Feb 2013 19:58:27 +0000 (20:58 +0100)
committerChristian Kuhn <lolli@schwarzbu.ch>
Sun, 3 Mar 2013 03:36:53 +0000 (04:36 +0100)
Change-Id: I8e542e3ce836cd45daa0cfd42b22da61ef721fab
Resolves: #45186
Releases: 6.1
Reviewed-on: https://review.typo3.org/18034
Reviewed-by: Alexander Opitz
Tested-by: Alexander Opitz
Reviewed-by: Christian Kuhn
Tested-by: Christian Kuhn
typo3/sysext/impexp/Classes/Clickmenu.php
typo3/sysext/impexp/Classes/Controller/ImportExportController.php
typo3/sysext/impexp/Classes/Controller/ModuleFunctionController.php
typo3/sysext/impexp/Classes/ImportExport.php
typo3/sysext/impexp/Classes/LocalPageTree.php
typo3/sysext/impexp/Classes/Task/ImportExportTask.php
typo3/sysext/impexp/app/index.php
typo3/sysext/impexp/ext_tables.php
typo3/sysext/impexp/ext_tables.sql

index cea3841..bdff6f3 100644 (file)
@@ -26,14 +26,7 @@ namespace TYPO3\CMS\Impexp;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
-/**
- * Adding Import/Export clickmenu item
- *
- * Revised for TYPO3 3.6 December/2003 by Kasper Skårhøj
- * XHTML compliant
- *
- * @author Kasper Skårhøj <kasperYYYY@typo3.com>
- */
+
 /**
  * Adding Import/Export clickmenu item
  *
@@ -67,10 +60,10 @@ class Clickmenu {
                                $url .= '&tx_impexp[record][]=' . rawurlencode(($table . ':' . $uid));
                                $url .= '&tx_impexp[external_ref][tables][]=_ALL';
                        }
-                       $localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('export', $LL)), $backRef->excludeIcon(\t3lib_iconWorks::getSpriteIcon('actions-document-export-t3d')), $backRef->urlRefForCM($url), 1);
+                       $localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('export', $LL)), $backRef->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-export-t3d')), $backRef->urlRefForCM($url), 1);
                        if ($table == 'pages') {
                                $url = $modUrl . '?id=' . $uid . '&table=' . $table . '&tx_impexp[action]=import';
-                               $localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('import', $LL)), $backRef->excludeIcon(\t3lib_iconWorks::getSpriteIcon('actions-document-import-t3d')), $backRef->urlRefForCM($url), 1);
+                               $localItems[] = $backRef->linkItem($GLOBALS['LANG']->makeEntities($GLOBALS['LANG']->getLLL('import', $LL)), $backRef->excludeIcon(\TYPO3\CMS\Backend\Utility\IconUtility::getSpriteIcon('actions-document-import-t3d')), $backRef->urlRefForCM($url), 1);
                        }
                }
                return array_merge($menuItems, $localItems);
@@ -84,10 +77,9 @@ class Clickmenu {
         */
        public function includeLL() {
                global $LANG;
-               return $LANG->includeLLFile('EXT:impexp/app/locallang.php', FALSE);
+               return $LANG->includeLLFile('EXT:impexp/app/locallang.xlf', FALSE);
        }
 
 }
 
-
 ?>
\ No newline at end of file
index 073a78e..a46ec06 100644 (file)
@@ -1,6 +1,32 @@
 <?php
 namespace TYPO3\CMS\Impexp\Controller;
 
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
 /**
  * Main script class for the Import / Export facility
  *
@@ -8,8 +34,9 @@ namespace TYPO3\CMS\Impexp\Controller;
  */
 class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
 
-       // Array containing the current page.
        /**
+        * Array containing the current page.
+        *
         * @todo Define visibility
         */
        public $pageinfo;
@@ -47,26 +74,26 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
                $inData = \TYPO3\CMS\Core\Utility\GeneralUtility::_GP('tx_impexp');
                $this->checkUpload();
                switch ((string) $inData['action']) {
-               case 'export':
-                       // Finally: If upload went well, set the new file as the thumbnail in the $inData array:
-                       if (is_object($this->fileProcessor) && $this->fileProcessor->internalUploadMap[1]) {
-                               $inData['meta']['thumbnail'] = md5($this->fileProcessor->internalUploadMap[1]);
-                       }
-                       // Call export interface
-                       $this->exportData($inData);
-                       break;
-               case 'import':
-                       // Finally: If upload went well, set the new file as the import file:
-                       if (is_object($this->fileProcessor) && $this->fileProcessor->internalUploadMap[1]) {
-                               $fI = pathinfo($this->fileProcessor->internalUploadMap[1]);
-                               // Only allowed extensions....
-                               if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('t3d,xml', strtolower($fI['extension']))) {
-                                       $inData['file'] = $this->fileProcessor->internalUploadMap[1];
+                       case 'export':
+                               // Finally: If upload went well, set the new file as the thumbnail in the $inData array:
+                               if (is_object($this->fileProcessor) && $this->fileProcessor->internalUploadMap[1]) {
+                                       $inData['meta']['thumbnail'] = md5($this->fileProcessor->internalUploadMap[1]);
                                }
-                       }
-                       // Call import interface:
-                       $this->importData($inData);
-                       break;
+                               // Call export interface
+                               $this->exportData($inData);
+                               break;
+                       case 'import':
+                               // Finally: If upload went well, set the new file as the import file:
+                               if (is_object($this->fileProcessor) && $this->fileProcessor->internalUploadMap[1]) {
+                                       $fI = pathinfo($this->fileProcessor->internalUploadMap[1]);
+                                       // Only allowed extensions....
+                                       if (\TYPO3\CMS\Core\Utility\GeneralUtility::inList('t3d,xml', strtolower($fI['extension']))) {
+                                               $inData['file'] = $this->fileProcessor->internalUploadMap[1];
+                                       }
+                               }
+                               // Call import interface:
+                               $this->importData($inData);
+                               break;
                }
                // Setting up the buttons and markers for docheader
                $docHeaderButtons = $this->getButtons();
@@ -115,10 +142,9 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
        }
 
        /**************************
-        *
         * EXPORT FUNCTIONS
-        *
         **************************/
+
        /**
         * Export part of module
         *
@@ -256,16 +282,16 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
                // If the download button is clicked, return file
                if ($inData['download_export'] || $inData['save_export']) {
                        switch ((string) $inData['filetype']) {
-                       case 'xml':
-                               $out = $this->export->compileMemoryToFileContent('xml');
-                               $fExt = '.xml';
-                               break;
-                       case 't3d':
-                               $this->export->dontCompress = 1;
-                       default:
-                               $out = $this->export->compileMemoryToFileContent();
-                               $fExt = ($this->export->doOutputCompress() ? '-z' : '') . '.t3d';
-                               break;
+                               case 'xml':
+                                       $out = $this->export->compileMemoryToFileContent('xml');
+                                       $fExt = '.xml';
+                                       break;
+                               case 't3d':
+                                       $this->export->dontCompress = 1;
+                               default:
+                                       $out = $this->export->compileMemoryToFileContent();
+                                       $fExt = ($this->export->doOutputCompress() ? '-z' : '') . '.t3d';
+                                       break;
                        }
                        // Filename:
                        $dlFile = $inData['filename'] ? $inData['filename'] : 'T3D_' . substr(preg_replace('/[^[:alnum:]_]/', '-', $inData['download_export_name']), 0, 20) . '_' . date('Y-m-d_H-i') . $fExt;
@@ -381,7 +407,14 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
         */
        public function exec_listQueryPid($table, $pid, $limit) {
                $orderBy = $GLOBALS['TCA'][$table]['ctrl']['sortby'] ? 'ORDER BY ' . $GLOBALS['TCA'][$table]['ctrl']['sortby'] : $GLOBALS['TCA'][$table]['ctrl']['default_sortby'];
-               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', $table, 'pid=' . intval($pid) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table) . \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause($table), '', $GLOBALS['TYPO3_DB']->stripOrderBy($orderBy), $limit);
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
+                       '*',
+                       $table,
+                       'pid=' . intval($pid) . \TYPO3\CMS\Backend\Utility\BackendUtility::deleteClause($table) . \TYPO3\CMS\Backend\Utility\BackendUtility::versioningPlaceholderClause($table),
+                       '',
+                       $GLOBALS['TYPO3_DB']->stripOrderBy($orderBy),
+                       $limit
+               );
                // Warning about hitting limit:
                if ($GLOBALS['TYPO3_DB']->sql_num_rows($res) == $limit) {
                        $this->content .= $this->doc->section($GLOBALS['LANG']->getLL('execlistqu_maxNumberLimit'), sprintf($GLOBALS['LANG']->getLL('makeconfig_anSqlQueryReturned', 1), $limit), 0, 1, 2);
@@ -681,10 +714,9 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
        }
 
        /**************************
-        *
         * IMPORT FUNCTIONS
-        *
         **************************/
+
        /**
         * Import part of module
         *
@@ -944,10 +976,9 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
        }
 
        /****************************
-        *
         * Preset functions
-        *
         ****************************/
+
        /**
         * Manipulate presets
         *
@@ -1054,10 +1085,9 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
        }
 
        /****************************
-        *
         * Helper functions
-        *
         ****************************/
+
        /**
         * Returns first temporary folder of the user account (from $FILEMOUNTS)
         *
@@ -1225,5 +1255,4 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass {
 
 }
 
-
 ?>
\ No newline at end of file
index 319bef9..8fd8a6e 100644 (file)
@@ -1,6 +1,32 @@
 <?php
 namespace TYPO3\CMS\Impexp\Controller;
 
+/***************************************************************
+ *  Copyright notice
+ *
+ *  (c) 1999-2011 Kasper Skårhøj (kasperYYYY@typo3.com)
+ *  All rights reserved
+ *
+ *  This script is part of the TYPO3 project. The TYPO3 project is
+ *  free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  The GNU General Public License can be found at
+ *  http://www.gnu.org/copyleft/gpl.html.
+ *  A copy is found in the textfile GPL.txt and important notices to the license
+ *  from the author is found in LICENSE.txt distributed with these scripts.
+ *
+ *
+ *  This script is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  This copyright notice MUST APPEAR in all copies of the script!
+ ***************************************************************/
+
 /**
  * Export Preset listing for the task center
  *
@@ -100,10 +126,9 @@ class ModuleFunctionController extends mod_user_task {
        }
 
        /*****************************
-        *
         * Helper functions
-        *
         *****************************/
+
        /**
         * Select presets for this user
         *
@@ -133,5 +158,4 @@ class ModuleFunctionController extends mod_user_task {
 
 }
 
-
 ?>
\ No newline at end of file
index b40accd..af0a81c 100644 (file)
@@ -26,11 +26,7 @@ namespace TYPO3\CMS\Impexp;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
-/**
- * T3D file Import/Export library (TYPO3 Record Document)
- *
- * @author Kasper Skårhøj <kasperYYYY@typo3.com>
- */
+
 /**
  * EXAMPLE for using the impexp-class for exporting stuff:
  *
@@ -67,218 +63,250 @@ namespace TYPO3\CMS\Impexp;
  */
 class ImportExport {
 
-       // Configuration, general
-       // If set, static relations (not exported) will be shown in overview as well
        /**
+        * If set, static relations (not exported) will be shown in overview as well
+        *
         * @todo Define visibility
         */
        public $showStaticRelations = FALSE;
 
-       // Name of the "fileadmin" folder where files for export/import should be located
        /**
+        * Name of the "fileadmin" folder where files for export/import should be located
+        *
         * @todo Define visibility
         */
        public $fileadminFolderName = '';
 
-       // Whether "import" or "export" mode of object. Set through init() function
        /**
+        * Whether "import" or "export" mode of object. Set through init() function
+        *
         * @todo Define visibility
         */
        public $mode = '';
 
-       // Updates all records that has same UID instead of creating new!
        /**
+        * Updates all records that has same UID instead of creating new!
+        *
         * @todo Define visibility
         */
        public $update = FALSE;
 
-       // Is set by importData() when an import has been done.
        /**
+        * Is set by importData() when an import has been done.
+        *
         * @todo Define visibility
         */
        public $doesImport = FALSE;
 
-       // Configuration, import
-       // If set to a page-record, then the preview display of the content will expect this page-record to be the target
-       // for the import and accordingly display validation information. This triggers the visual view of the
-       // import/export memory to validate if import is possible
        /**
+        * If set to a page-record, then the preview display of the content will expect this page-record to be the target
+        * for the import and accordingly display validation information. This triggers the visual view of the
+        * import/export memory to validate if import is possible
+        *
         * @todo Define visibility
         */
        public $display_import_pid_record = '';
 
-       // Used to register the forged UID values for imported records that we want to create with the same UIDs as in the import file. Admin-only feature.
        /**
+        * Used to register the forged UID values for imported records that we want to create with the same UIDs as in the import file. Admin-only feature.
+        *
         * @todo Define visibility
         */
        public $suggestedInsertUids = array();
 
-       // Setting import modes during update state: as_new, exclude, force_uid
        /**
+        * Setting import modes during update state: as_new, exclude, force_uid
+        *
         * @todo Define visibility
         */
        public $import_mode = array();
 
-       // If set, PID correct is ignored globally
        /**
+        * If set, PID correct is ignored globally
+        *
         * @todo Define visibility
         */
        public $global_ignore_pid = FALSE;
 
-       // If set, all UID values are forced! (update or import)
        /**
+        * If set, all UID values are forced! (update or import)
+        *
         * @todo Define visibility
         */
        public $force_all_UIDS = FALSE;
 
-       // If set, a diff-view column is added to the overview.
        /**
+        * If set, a diff-view column is added to the overview.
+        *
         * @todo Define visibility
         */
        public $showDiff = FALSE;
 
-       // If set, and if the user is admin, allow the writing of PHP scripts to fileadmin/ area.
        /**
+        * If set, and if the user is admin, allow the writing of PHP scripts to fileadmin/ area.
+        *
         * @todo Define visibility
         */
        public $allowPHPScripts = FALSE;
 
-       // Disable logging when importing
        /**
+        * Disable logging when importing
+        *
         * @todo Define visibility
         */
        public $enableLogging = FALSE;
 
-       // Array of values to substitute in editable softreferences.
        /**
+        * Array of values to substitute in editable softreferences.
+        *
         * @todo Define visibility
         */
        public $softrefInputValues = array();
 
-       // Mapping between the fileID from import memory and the final filenames they are written to.
        /**
+        * Mapping between the fileID from import memory and the final filenames they are written to.
+        *
         * @todo Define visibility
         */
        public $fileIDMap = array();
 
-       // Configuration, export
-       // 1MB max file size
        /**
+        * 1MB max file size
+        *
         * @todo Define visibility
         */
        public $maxFileSize = 1000000;
 
-       // 1MB max record size
        /**
+        * 1MB max record size
+        *
         * @todo Define visibility
         */
        public $maxRecordSize = 1000000;
 
-       // 10MB max export size
        /**
+        * 10MB max export size
+        *
         * @todo Define visibility
         */
        public $maxExportSize = 10000000;
 
-       // add table names here which are THE ONLY ones which will be included into export if found as relations. '_ALL' will allow all tables.
        /**
+        * Add table names here which are THE ONLY ones which will be included into export if found as relations. '_ALL' will allow all tables.
+        *
         * @todo Define visibility
         */
        public $relOnlyTables = array();
 
-       // add tables names here which should not be exported with the file. (Where relations should be mapped to same UIDs in target system).
        /**
+        * Add tables names here which should not be exported with the file. (Where relations should be mapped to same UIDs in target system).
+        *
         * @todo Define visibility
         */
        public $relStaticTables = array();
 
-       // Exclude map. Keys are table:uid  pairs and if set, records are not added to the export.
        /**
+        * Exclude map. Keys are table:uid  pairs and if set, records are not added to the export.
+        *
         * @todo Define visibility
         */
        public $excludeMap = array();
 
-       // Soft Reference Token ID modes.
        /**
+        * Soft Reference Token ID modes.
+        *
         * @todo Define visibility
         */
        public $softrefCfg = array();
 
-       // Listing extension dependencies.
        /**
+        * Listing extension dependencies.
+        *
         * @todo Define visibility
         */
        public $extensionDependencies = array();
 
-       // Set  by user: If set, compression in t3d files is disabled
        /**
+        * Set  by user: If set, compression in t3d files is disabled
+        *
         * @todo Define visibility
         */
        public $dontCompress = 0;
 
-       // Boolean, if set, HTML file resources are included.
        /**
+        * Boolean, if set, HTML file resources are included.
+        *
         * @todo Define visibility
         */
        public $includeExtFileResources = 0;
 
-       // Files with external media (HTML/css style references inside)
        /**
+        * Files with external media (HTML/css style references inside)
+        *
         * @todo Define visibility
         */
        public $extFileResourceExtensions = 'html,htm,css';
 
-       // Internal, dynamic:
-       // After records are written this array is filled with [table][original_uid] = [new_uid]
        /**
+        * After records are written this array is filled with [table][original_uid] = [new_uid]
+        *
         * @todo Define visibility
         */
        public $import_mapId = array();
 
-       // Keys are [tablename]:[new NEWxxx ids (or when updating it is uids)] while values are arrays with table/uid of the original record it is based on. By the array keys the new ids can be looked up inside tcemain
        /**
+        * Keys are [tablename]:[new NEWxxx ids (or when updating it is uids)] while values are arrays with table/uid of the original record it is based on.
+        * By the array keys the new ids can be looked up inside tcemain
+        *
         * @todo Define visibility
         */
        public $import_newId = array();
 
-       // Page id map for page tree (import)
        /**
+        * Page id map for page tree (import)
+        *
         * @todo Define visibility
         */
        public $import_newId_pids = array();
 
-       // Internal data accumulation for writing records during import
        /**
+        * Internal data accumulation for writing records during import
+        *
         * @todo Define visibility
         */
        public $import_data = array();
 
-       // Error log.
        /**
+        * Error log.
+        *
         * @todo Define visibility
         */
        public $errorLog = array();
 
-       // Cache for record paths
        /**
+        * Cache for record paths
+        *
         * @todo Define visibility
         */
        public $cache_getRecordPath = array();
 
-       // Cache of checkPID values.
        /**
+        * Cache of checkPID values.
+        *
         * @todo Define visibility
         */
        public $checkPID_cache = array();
 
-       // Set internally if the gzcompress function exists
        /**
+        * Set internally if the gzcompress function exists
+        *
         * @todo Define visibility
         */
        public $compress = 0;
 
-       // Internal import/export memory
        /**
+        * Internal import/export memory
+        *
         * @todo Define visibility
         */
        public $dat = array();
@@ -292,10 +320,9 @@ class ImportExport {
        public $fileProcObj = '';
 
        /**************************
-        *
         * Initialize
-        *
         *************************/
+
        /**
         * Init the object, both import and export
         *
@@ -312,10 +339,9 @@ class ImportExport {
        }
 
        /**************************
-        *
         * Export / Init + Meta Data
-        *
         *************************/
+
        /**
         * Set header basics
         *
@@ -406,10 +432,9 @@ class ImportExport {
        }
 
        /**************************
-        *
         * Export / Init Page tree
-        *
         *************************/
+
        /**
         * Sets the page-tree array in the export header and returns the array in a flattened version
         *
@@ -490,10 +515,9 @@ class ImportExport {
        }
 
        /**************************
-        *
         * Export
-        *
         *************************/
+
        /**
         * Adds the record $row from $table.
         * No checking for relations done here. Pure data.
@@ -945,10 +969,9 @@ class ImportExport {
        }
 
        /**************************
-        *
         * File Output
-        *
         *************************/
+
        /**
         * This compiles and returns the data content for an exported file
         *
@@ -1088,10 +1111,9 @@ class ImportExport {
        }
 
        /***********************
-        *
         * Import
-        *
         ***********************/
+
        /**
         * Imports the internal data array to $pid.
         *
@@ -1373,18 +1395,18 @@ class ImportExport {
                                // Setting db/file blank:
                                foreach ($this->dat['records'][$table . ':' . $uid]['rels'] as $field => $config) {
                                        switch ((string) $config['type']) {
-                                       case 'db':
+                                               case 'db':
 
-                                       case 'file':
-                                               // Fixed later in ->setRelations() [because we need to know ALL newly created IDs before we can map relations!]
-                                               // In the meantime we set NO values for relations:
-                                               $this->import_data[$table][$ID][$field] = '';
-                                               break;
-                                       case 'flex':
-                                               // Fixed later in setFlexFormRelations()
-                                               // In the meantime we set NO value for flexforms - this is mainly because file references inside will not be processed properly; In fact references will point to no file or existing files (in which case there will be double-references which is a big problem of course!)
-                                               $this->import_data[$table][$ID][$field] = '';
-                                               break;
+                                               case 'file':
+                                                       // Fixed later in ->setRelations() [because we need to know ALL newly created IDs before we can map relations!]
+                                                       // In the meantime we set NO values for relations:
+                                                       $this->import_data[$table][$ID][$field] = '';
+                                                       break;
+                                               case 'flex':
+                                                       // Fixed later in setFlexFormRelations()
+                                                       // In the meantime we set NO value for flexforms - this is mainly because file references inside will not be processed properly; In fact references will point to no file or existing files (in which case there will be double-references which is a big problem of course!)
+                                                       $this->import_data[$table][$ID][$field] = '';
+                                                       break;
                                        }
                                }
                        } elseif ($table . ':' . $uid != 'pages:0') {
@@ -1456,10 +1478,9 @@ class ImportExport {
        }
 
        /***************************
-        *
         * Import / Relations setting
-        *
         ***************************/
+
        /**
         * At the end of the import process all file and DB relations should be set properly (that is relations to imported records are all re-created so imported records are correctly related again)
         * Relations in flexform fields are processed in setFlexFormRelations() after this function
@@ -1482,21 +1503,21 @@ class ImportExport {
                                        // Traverse relation fields of each record
                                        foreach ($this->dat['records'][$table . ':' . $uid]['rels'] as $field => $config) {
                                                switch ((string) $config['type']) {
-                                               case 'db':
-                                                       if (is_array($config['itemArray']) && count($config['itemArray'])) {
-                                                               $valArray = $this->setRelations_db($config['itemArray']);
-                                                               $updateData[$table][$thisNewUid][$field] = implode(',', $valArray);
-                                                       }
-                                                       break;
-                                               case 'file':
-                                                       if (is_array($config['newValueFiles']) && count($config['newValueFiles'])) {
-                                                               $valArr = array();
-                                                               foreach ($config['newValueFiles'] as $fI) {
-                                                                       $valArr[] = $this->import_addFileNameToBeCopied($fI);
+                                                       case 'db':
+                                                               if (is_array($config['itemArray']) && count($config['itemArray'])) {
+                                                                       $valArray = $this->setRelations_db($config['itemArray']);
+                                                                       $updateData[$table][$thisNewUid][$field] = implode(',', $valArray);
                                                                }
-                                                               $updateData[$table][$thisNewUid][$field] = implode(',', $valArr);
-                                                       }
-                                                       break;
+                                                               break;
+                                                       case 'file':
+                                                               if (is_array($config['newValueFiles']) && count($config['newValueFiles'])) {
+                                                                       $valArr = array();
+                                                                       foreach ($config['newValueFiles'] as $fI) {
+                                                                               $valArr[] = $this->import_addFileNameToBeCopied($fI);
+                                                                       }
+                                                                       $updateData[$table][$thisNewUid][$field] = implode(',', $valArr);
+                                                               }
+                                                               break;
                                                }
                                        }
                                } else {
@@ -1673,10 +1694,9 @@ class ImportExport {
        }
 
        /**************************
-        *
         * Import / Soft References
-        *
         *************************/
+
        /**
         * Processing of soft references
         *
@@ -2095,10 +2115,9 @@ class ImportExport {
        }
 
        /**************************
-        *
         * File Input
-        *
         *************************/
+
        /**
         * Loads the header section/all of the $filename into memory
         *
@@ -2287,10 +2306,9 @@ class ImportExport {
        }
 
        /********************************************************
-        *
         * Visual rendering of import/export memory, $this->dat
-        *
         ********************************************************/
+
        /**
         * Displays an overview of the header-content.
         *
@@ -2884,10 +2902,9 @@ class ImportExport {
        }
 
        /*****************************
-        *
         * Helper functions of kinds
-        *
         *****************************/
+
        /**
         * Returns TRUE if the input table name is to be regarded as a static relation (that is, not exported etc).
         *
@@ -3120,10 +3137,9 @@ class ImportExport {
        }
 
        /*****************************
-        *
         * Error handling
-        *
         *****************************/
+
        /**
         * Sets error message in the internal error log
         *
@@ -3147,5 +3163,4 @@ class ImportExport {
 
 }
 
-
 ?>
\ No newline at end of file
index 06dd800..0777b24 100644 (file)
@@ -26,6 +26,7 @@ namespace TYPO3\CMS\Impexp;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * Extension of the page tree class. Used to get the tree of pages to export.
  *
@@ -35,8 +36,6 @@ class LocalPageTree extends \TYPO3\CMS\Backend\Tree\View\BrowseTreeView {
 
        /**
         * Initialization
-        *
-        * @todo Define visibility
         */
        public function __construct() {
                $this->init();
@@ -152,5 +151,4 @@ class LocalPageTree extends \TYPO3\CMS\Backend\Tree\View\BrowseTreeView {
 
 }
 
-
 ?>
\ No newline at end of file
index a791b4d..58a2c13 100644 (file)
@@ -24,6 +24,7 @@ namespace TYPO3\CMS\Impexp\Task;
  *
  *  This copyright notice MUST APPEAR in all copies of the script!
  ***************************************************************/
+
 /**
  * This class provides a textarea to save personal notes
  *
@@ -35,7 +36,7 @@ class ImportExportTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
        /**
         * Back-reference to the calling reports module
         *
-        * @var tx_reports_Module $taskObject
+        * @var \TYPO3\CMS\Taskcenter\Controller\TaskModuleController $taskObject
         */
        protected $taskObject;
 
@@ -140,7 +141,12 @@ class ImportExportTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
                                $content .= $this->taskObject->renderListMenu($lines);
                        } else {
                                // No presets found
-                               $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\\FlashMessage', $GLOBALS['LANG']->getLL('no-presets'), '', \TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE);
+                               $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(
+                                       'TYPO3\\CMS\\Core\\Messaging\\FlashMessage',
+                                       $GLOBALS['LANG']->getLL('no-presets'),
+                                       '',
+                                       \TYPO3\CMS\Core\Messaging\FlashMessage::NOTICE
+                               );
                                $content .= $flashMessage->render();
                        }
                }
@@ -153,7 +159,13 @@ class ImportExportTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
         * @return array Array of preset records
         */
        protected function getPresets() {
-               $presets = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows('*', 'tx_impexp_presets', '(public > 0 OR user_uid=' . $GLOBALS['BE_USER']->user['uid'] . ')', '', 'item_uid DESC, title');
+               $presets = $GLOBALS['TYPO3_DB']->exec_SELECTgetRows(
+                       '*',
+                       'tx_impexp_presets',
+                       '(public > 0 OR user_uid=' . $GLOBALS['BE_USER']->user['uid'] . ')',
+                       '',
+                       'item_uid DESC, title'
+               );
                return $presets;
        }
 
@@ -174,5 +186,4 @@ class ImportExportTask implements \TYPO3\CMS\Taskcenter\TaskInterface {
 
 }
 
-
 ?>
\ No newline at end of file
index a1873e3..7b39bfc 100755 (executable)
@@ -63,7 +63,7 @@
 unset($MCONF);
 require 'conf.php';
 require_once $BACK_PATH . 'init.php';
-$LANG->includeLLFile('EXT:impexp/app/locallang.php');
+$LANG->includeLLFile('EXT:impexp/app/locallang.xlf');
 \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded('impexp', 1);
 /*
  * @deprecated since 6.0, the classname SC_mod_tools_log_index and this file is obsolete
index 9609122..5276d55 100755 (executable)
@@ -2,16 +2,16 @@
 if (!defined('TYPO3_MODE')) {
        die('Access denied.');
 }
-if (TYPO3_MODE == 'BE') {
+if (TYPO3_MODE === 'BE') {
        $GLOBALS['TBE_MODULES_EXT']['xMOD_alt_clickmenu']['extendCMclasses'][] = array(
                'name' => 'TYPO3\\CMS\\Impexp\\Clickmenu',
        );
        $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['taskcenter']['impexp']['tx_impexp_task'] = array(
-               'title' => 'LLL:EXT:impexp/locallang_csh.xml:.alttitle',
-               'description' => 'LLL:EXT:impexp/locallang_csh.xml:.description',
+               'title' => 'LLL:EXT:impexp/locallang_csh.xlf:.alttitle',
+               'description' => 'LLL:EXT:impexp/locallang_csh.xlf:.description',
                'icon' => 'EXT:impexp/export.gif'
        );
-       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('xMOD_tx_impexp', 'EXT:impexp/locallang_csh.xml');
+       \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addLLrefForTCAdescr('xMOD_tx_impexp', 'EXT:impexp/locallang_csh.xlf');
        // CSH labels for TYPO3 4.5 and greater.  These labels override the ones set above, while still falling back to the original labels if no translation is available.
        $GLOBALS['TYPO3_CONF_VARS']['SYS']['locallangXMLOverride']['EXT:impexp/locallang_csh.xml'][] = 'EXT:impexp/locallang_csh_45.xml';
        // Special context menu actions for the import/export module
@@ -29,7 +29,7 @@ if (TYPO3_MODE == 'BE') {
                9200 = ITEM
                9200 {
                        name = importT3d
-                       label = LLL:EXT:impexp/app/locallang.xml:import
+                       label = LLL:EXT:impexp/app/locallang.xlf:import
                        spriteIcon = actions-document-import-t3d
                        callbackAction = importT3d
                }
index eb482de..c513627 100755 (executable)
@@ -1,4 +1,3 @@
-
 #
 # Table structure for table 'tx_impexp_presets'
 #
@@ -11,4 +10,4 @@ CREATE TABLE tx_impexp_presets (
   preset_data blob,
   PRIMARY KEY (uid),
   KEY lookup (item_uid)
-);
+);
\ No newline at end of file