2 namespace TYPO3\CMS\Impexp\Controller;
136 $this->lang->includeLLFile(
'EXT:impexp/Resources/Private/Language/locallang.xlf');
140 $this->doc->bodyTagId =
'imp-exp-mod';
142 $this->moduleTemplate->getDocHeaderComponent()->setMetaInformation($this->pageinfo);
144 $this->moduleTemplate->getPageRenderer()->loadRequireJsModule(
'TYPO3/CMS/Backend/ClickMenu');
145 $this->moduleTemplate->getPageRenderer()->loadRequireJsModule(
'TYPO3/CMS/Impexp/ImportExport');
146 $this->moduleTemplate->addJavaScriptCode(
148 'if (top.fsMod) top.fsMod.recentIds["web"] = ' . (
int)$this->
id .
';'
150 $this->content =
'<form action="' . htmlspecialchars(BackendUtility::getModuleUrl(
'xMOD_tximpexp')) .
'" method="post" id="ImportExportController" enctype="multipart/form-data">'
151 .
'<input type="hidden" name="id" value="' . $this->
id .
'" />';
154 $this->content .=
'<h3>' . $this->lang->getLL(
'title_' . (
string)$inData[
'action'],
true) .
'</h3>';
155 $this->content .=
'<div style="padding-top: 5px;"></div>';
157 switch ((
string)$inData[
'action']) {
159 $this->shortcutName = $this->lang->getLL(
'title_export');
161 if (!empty($this->uploadedFiles[0])) {
162 $inData[
'meta'][
'thumbnail'] = $this->uploadedFiles[0]->getCombinedIdentifier();
165 $this->exportData($inData);
168 $this->shortcutName = $this->lang->getLL(
'title_import');
170 if (!empty($this->uploadedFiles[0])) {
173 $inData[
'file'] = $this->uploadedFiles[0]->getCombinedIdentifier();
177 $this->importData($inData);
182 $this->content .=
'</form>';
237 $this->moduleTemplate->setContent($this->content);
238 $response->
getBody()->write($this->moduleTemplate->renderContent());
249 $buttonBar = $this->moduleTemplate->getDocHeaderComponent()->getButtonBar();
251 $shortcutButton = $buttonBar->makeShortcutButton()
252 ->setGetVariables([
'tx_impexp'])
253 ->setDisplayName($this->shortcutName)
254 ->setModuleName($this->moduleName);
255 $buttonBar->addButton($shortcutButton);
259 if ((
string)$inData[
'action'] ==
'import') {
260 if ($this->
id && is_array($this->pageinfo) || $this->
getBackendUser()->user[
'admin'] && !$this->
id) {
261 if (is_array($this->pageinfo) && $this->pageinfo[
'uid']) {
264 $this->pageinfo[
'uid'],
268 $viewButton = $buttonBar->makeLinkButton()
269 ->setTitle($this->lang->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.showPage',
true))
271 ->setIcon($this->iconFactory->getIcon(
'actions-document-view',
Icon::SIZE_SMALL))
272 ->setOnClick($onClick);
273 $buttonBar->addButton($viewButton);
293 public function exportData($inData)
300 $inData[
'filename'] = trim(preg_replace(
'/[^[:alnum:]._-]*/',
'', preg_replace(
'/\\.(t3d|xml)$/',
'', $inData[
'filename'])));
301 if (strlen($inData[
'filename'])) {
302 $inData[
'filename'] .= $inData[
'filetype'] ==
'xml' ?
'.xml' :
'.t3d';
305 if (!is_array($inData[
'exclude'])) {
306 $inData[
'exclude'] = array();
309 $this->processPresets($inData);
312 $this->export->init(0,
'export');
313 $this->export->setCharset($this->lang->charSet);
314 $this->export->maxFileSize = $inData[
'maxFileSize'] * 1024;
315 $this->export->excludeMap = (array)$inData[
'exclude'];
316 $this->export->softrefCfg = (array)$inData[
'softrefCfg'];
317 $this->export->extensionDependencies = (array)$inData[
'extension_dep'];
318 $this->export->showStaticRelations = $inData[
'showStaticRelations'];
319 $this->export->includeExtFileResources = !$inData[
'excludeHTMLfileResources'];
321 if (is_array($inData[
'external_static'][
'tables'])) {
322 $this->export->relStaticTables = $inData[
'external_static'][
'tables'];
325 if (is_array($inData[
'external_ref'][
'tables'])) {
326 $this->export->relOnlyTables = $inData[
'external_ref'][
'tables'];
328 $saveFilesOutsideExportFile =
false;
329 if (isset($inData[
'save_export']) && isset($inData[
'saveFilesOutsideExportFile']) && $inData[
'saveFilesOutsideExportFile'] ===
'1') {
330 $this->export->setSaveFilesOutsideExportFile(
true);
331 $saveFilesOutsideExportFile =
true;
333 $this->export->setHeaderBasics();
337 $this->export->setMetaData(
338 $inData[
'meta'][
'title'],
339 $inData[
'meta'][
'description'],
340 $inData[
'meta'][
'notes'],
341 $beUser->user[
'username'],
342 $beUser->user[
'realName'],
343 $beUser->user[
'email']
345 if ($inData[
'meta'][
'thumbnail']) {
346 $theThumb = $this->
getFile($inData[
'meta'][
'thumbnail']);
347 if ($theThumb !== null && $theThumb->exists()) {
348 $this->export->addThumbnail($theThumb->getForLocalProcessing(
false));
352 if (is_array($inData[
'record'])) {
353 foreach ($inData[
'record'] as $ref) {
354 $rParts = explode(
':', $ref);
359 if (is_array($inData[
'list'])) {
361 foreach ($inData[
'list'] as $ref) {
362 $rParts = explode(
':', $ref);
363 if ($beUser->check(
'tables_select', $rParts[0])) {
365 while ($subTrow = $db->sql_fetch_assoc($res)) {
366 $this->export->export_addRecord($rParts[0], $subTrow);
368 $db->sql_free_result($res);
373 if (isset($inData[
'pagetree'][
'id'])) {
376 if ($inData[
'pagetree'][
'levels'] == -1) {
378 $tree = $pagetree->ext_tree($inData[
'pagetree'][
'id'], $this->
filterPageIds($this->export->excludeMap));
379 $this->treeHTML = $pagetree->printTree($tree);
380 $idH = $pagetree->buffer_idH;
381 }
elseif ($inData[
'pagetree'][
'levels'] == -2) {
382 $this->
addRecordsForPid($inData[
'pagetree'][
'id'], $inData[
'pagetree'][
'tables'], $inData[
'pagetree'][
'maxNumber']);
387 if (!$inData[
'pagetree'][
'id'] && $beUser->isAdmin()) {
395 if (is_array($sPage)) {
396 $pid = $inData[
'pagetree'][
'id'];
398 $tree->init(
'AND ' . $this->perms_clause . $this->
filterPageIds($this->export->excludeMap));
399 $HTML = $this->iconFactory->getIconForRecord(
'pages', $sPage,
Icon::SIZE_SMALL)->render();
400 $tree->tree[] = array(
'row' => $sPage,
'HTML' => $HTML);
401 $tree->buffer_idH = array();
402 if ($inData[
'pagetree'][
'levels'] > 0) {
403 $tree->getTree($pid, $inData[
'pagetree'][
'levels'],
'');
406 $idH[$pid][
'uid'] = $pid;
407 if (!empty($tree->buffer_idH)) {
408 $idH[$pid][
'subrow'] = $tree->buffer_idH;
411 $this->treeHTML = $pagetree->printTree($tree->tree);
412 $this->shortcutName .=
' (' . $sPage[
'title'] .
')';
417 if (is_array($idH)) {
419 $flatList = $this->export->setPageTree($idH);
420 foreach ($flatList as $k => $value) {
422 $this->
addRecordsForPid($k, $inData[
'pagetree'][
'tables'], $inData[
'pagetree'][
'maxNumber']);
427 for ($a = 0; $a < 10; $a++) {
428 $addR = $this->export->export_addDBRelations($a);
435 $this->export->export_addFilesFromRelations();
437 $this->export->export_addFilesFromSysFilesRecords();
440 if ($inData[
'download_export'] || $inData[
'save_export']) {
441 switch ((
string)$inData[
'filetype']) {
443 $out = $this->export->compileMemoryToFileContent(
'xml');
447 $this->export->dontCompress = 1;
450 $out = $this->export->compileMemoryToFileContent();
451 $fExt = ($this->export->doOutputCompress() ?
'-z' :
'') .
'.t3d';
454 $dlFile = $inData[
'filename'];
456 $exportName = substr(preg_replace(
'/[^[:alnum:]_]/',
'-', $inData[
'download_export_name']), 0, 20);
457 $dlFile =
'T3D_' . $exportName .
'_' . date(
'Y-m-d_H-i') . $fExt;
461 if ($inData[
'download_export']) {
462 $mimeType =
'application/octet-stream';
463 Header(
'Content-Type: ' . $mimeType);
464 Header(
'Content-Length: ' . strlen($out));
465 Header(
'Content-Disposition: attachment; filename=' . basename($dlFile));
470 if ($inData[
'save_export']) {
472 if ($saveFolder !==
false && $saveFolder->checkActionPermission(
'write')) {
474 file_put_contents($temporaryFileName, $out);
475 $file = $saveFolder->addFile($temporaryFileName, $dlFile,
'replace');
476 if ($saveFilesOutsideExportFile) {
477 $filesFolderName = $dlFile .
'.files';
478 $filesFolder = $saveFolder->createFolder($filesFolderName);
479 $temporaryFolderForExport =
ResourceFactory::getInstance()->retrieveFileOrFolderObject($this->export->getTemporaryFilesPathForExport());
480 $temporaryFilesForExport = $temporaryFolderForExport->getFiles();
481 foreach ($temporaryFilesForExport as $temporaryFileForExport) {
482 $filesFolder->getStorage()->moveFile($temporaryFileForExport, $filesFolder);
484 $temporaryFolderForExport->delete();
491 $GLOBALS[
'LANG']->getLL(
'exportdata_savedFile'),
498 sprintf(
$GLOBALS[
'LANG']->getLL(
'exportdata_badPathS',
true), $saveFolder->getPublicUrl()),
499 $GLOBALS[
'LANG']->getLL(
'exportdata_problemsSavingFile'),
503 $this->content .= $flashMessage->render();
508 $menuItems = array();
512 $menuItems[] = array(
513 'label' => $this->lang->getLL(
'tableselec_configuration'),
515 <table border="0" cellpadding="1" cellspacing="1">
524 $menuItems[] = array(
525 'label' => $this->lang->getLL(
'exportdata_filePreset'),
527 <table border="0" cellpadding="1" cellspacing="1">
536 $menuItems[] = array(
537 'label' => $this->lang->getLL(
'exportdata_advancedOptions'),
539 <table border="0" cellpadding="1" cellspacing="1">
546 $overViewContent = $this->export->displayContentOverview();
548 $errors = $this->export->printErrorLog();
549 $menuItems[] = array(
550 'label' => $this->lang->getLL(
'exportdata_messages'),
551 'content' => $errors,
552 'stateIcon' => $errors ? 2 : 0
556 $content = $this->moduleTemplate->getDynamicTabMenu($menuItems,
'tx_impexp_export', 1,
false,
true,
false);
557 $content .=
'<input type="hidden" name="tx_impexp[action]" value="export" />';
558 $this->content .=
'<div>' . $content .
'</div>';
560 $this->content .=
'<h2>' . $this->lang->getLL(
'execlistqu_structureToBeExported',
true) .
'</h2><div>' . $overViewContent .
'</div>';
573 if (!is_array($tables)) {
577 foreach (
$GLOBALS[
'TCA'] as $table => $value) {
578 if ($table !=
'pages' && (in_array($table, $tables) || in_array(
'_ALL', $tables))) {
579 if ($this->
getBackendUser()->check(
'tables_select', $table) && !
$GLOBALS[
'TCA'][$table][
'ctrl'][
'is_static']) {
581 while ($subTrow = $db->sql_fetch_assoc($res)) {
582 $this->export->export_addRecord($table, $subTrow);
584 $db->sql_free_result($res);
598 public function exec_listQueryPid($table, $pid, $limit)
601 $orderBy =
$GLOBALS[
'TCA'][$table][
'ctrl'][
'sortby']
602 ?
'ORDER BY ' .
$GLOBALS[
'TCA'][$table][
'ctrl'][
'sortby']
603 :
$GLOBALS[
'TCA'][$table][
'ctrl'][
'default_sortby'];
604 $res = $db->exec_SELECTquery(
609 $db->stripOrderBy($orderBy),
613 if ($db->sql_num_rows($res) == $limit) {
614 $limitWarning = sprintf($this->lang->getLL(
'makeconfig_anSqlQueryReturned',
true), $limit);
618 $this->lang->getLL(
'execlistqu_maxNumberLimit'),
622 $this->content .= $flashMessage->render();
636 $nameSuggestion =
'';
638 if (isset($inData[
'pagetree'][
'id'])) {
639 $nameSuggestion .=
'tree_PID' . $inData[
'pagetree'][
'id'] .
'_L' . $inData[
'pagetree'][
'levels'];
641 <tr class="tableheader bgColor5">
642 <td colspan="2">' . $this->lang->getLL(
'makeconfig_exportPagetreeConfiguration',
true)
646 <tr class="bgColor4">
647 <td><strong>' . $this->lang->getLL(
'makeconfig_pageId',
true) .
'</strong></td>
648 <td>' . htmlspecialchars($inData[
'pagetree'][
'id']) .
'<input type="hidden" value="'
649 . htmlspecialchars($inData[
'pagetree'][
'id']) .
'" name="tx_impexp[pagetree][id]" /></td>
652 <tr class="bgColor4">
653 <td><strong>' . $this->lang->getLL(
'makeconfig_tree',
true) .
'</strong>'
655 <td>' . ($this->treeHTML ?: $this->lang->getLL(
'makeconfig_noTreeExportedOnly',
true)) .
'</td>
658 '-2' => $this->lang->getLL(
'makeconfig_tablesOnThisPage'),
659 '-1' => $this->lang->getLL(
'makeconfig_expandedTree'),
660 '0' => $this->lang->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.depth_0'),
661 '1' => $this->lang->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.depth_1'),
662 '2' => $this->lang->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.depth_2'),
663 '3' => $this->lang->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.depth_3'),
664 '4' => $this->lang->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.depth_4'),
665 '999' => $this->lang->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.depth_infi'),
668 <tr class="bgColor4">
669 <td><strong>' . $this->lang->getLL(
'makeconfig_levels',
true) .
'</strong>'
671 <td>' . $this->
renderSelectBox(
'tx_impexp[pagetree][levels]', $inData[
'pagetree'][
'levels'], $opt) .
'</td>
674 <tr class="bgColor4">
675 <td><strong>' . $this->lang->getLL(
'makeconfig_includeTables',
true) .
'</strong>'
677 <td>' . $this->
tableSelector(
'tx_impexp[pagetree][tables]', $inData[
'pagetree'][
'tables'],
'pages') .
'<br/>
678 ' . $this->lang->getLL(
'makeconfig_maxNumberOfRecords',
true) .
'<br/>
679 <input type="text" name="tx_impexp[pagetree][maxNumber]" value="'
680 . htmlspecialchars($inData[
'pagetree'][
'maxNumber']) .
'"' . $this->doc->formWidth(10) .
' /><br/>
685 if (is_array($inData[
'record'])) {
687 <tr class="tableheader bgColor5">
688 <td colspan="2">' . $this->lang->getLL(
'makeconfig_exportSingleRecord',
true)
691 foreach ($inData[
'record'] as $ref) {
692 $rParts = explode(
':', $ref);
695 $nameSuggestion .= $tName .
'_' . $rUid;
699 <tr class="bgColor4">
700 <td><strong>' . $this->lang->getLL(
'makeconfig_record',
true) .
'</strong></td>
702 .
'<input type="hidden" name="tx_impexp[record][]" value="' . htmlspecialchars(($tName .
':' . $rUid)) .
'" /></td>
708 if (is_array($inData[
'list'])) {
710 <tr class="tableheader bgColor5">
711 <td colspan="2">' . $this->lang->getLL(
'makeconfig_exportTablesFromPages',
true) .
'</td>
715 foreach ($inData[
'list'] as $reference) {
716 $referenceParts = explode(
':', $reference);
717 $tableName = $referenceParts[0];
718 if ($this->
getBackendUser()->check(
'tables_select', $tableName)) {
721 if ($referenceParts[1] ===
'0') {
722 $iconAndTitle = $this->iconFactory->getIcon(
'apps-pagetree-root',
Icon::SIZE_SMALL)->render() .
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'sitename'];
725 $iconAndTitle = $this->iconFactory->getIconForRecord(
'pages', $record,
Icon::SIZE_SMALL)->render()
728 $tblList .=
'Table "' . $tableName .
'" from ' . $iconAndTitle
729 .
'<input type="hidden" name="tx_impexp[list][]" value="' . htmlspecialchars($reference) .
'" /><br/>';
733 <tr class="bgColor4">
734 <td><strong>' . $this->lang->getLL(
'makeconfig_tablePids',
true) .
'</strong>'
736 <td>' . $tblList .
'</td>
739 <tr class="bgColor4">
740 <td><strong>' . $this->lang->getLL(
'makeconfig_maxNumberOfRecords',
true)
743 <input type="text" name="tx_impexp[listCfg][maxNumber]" value="'
744 . htmlspecialchars($inData[
'listCfg'][
'maxNumber']) .
'" /><br/>
749 <tr class="tableheader bgColor5">
750 <td colspan="2">' . $this->lang->getLL(
'makeconfig_relationsAndExclusions',
true) .
'</td>
754 <tr class="bgColor4">
755 <td><strong>' . $this->lang->getLL(
'makeconfig_includeRelationsToTables',
true) .
'</strong>'
757 <td>' . $this->
tableSelector(
'tx_impexp[external_ref][tables]', $inData[
'external_ref'][
'tables']) .
'</td>
761 <tr class="bgColor4">
762 <td><strong>' . $this->lang->getLL(
'makeconfig_useStaticRelationsFor',
true) .
'</strong>'
764 <td>' . $this->
tableSelector(
'tx_impexp[external_static][tables]', $inData[
'external_static'][
'tables']) .
'<br/>
765 <label for="checkShowStaticRelations">' . $this->lang->getLL(
'makeconfig_showStaticRelations',
true)
766 .
'</label> <input type="checkbox" name="tx_impexp[showStaticRelations]" id="checkShowStaticRelations" value="1"'
767 . ($inData[
'showStaticRelations'] ?
' checked="checked"' :
'') .
' />
771 $excludeHiddenFields =
'';
772 if (is_array($inData[
'exclude'])) {
773 foreach ($inData[
'exclude'] as $key => $value) {
774 $excludeHiddenFields .=
'<input type="hidden" name="tx_impexp[exclude][' . $key .
']" value="1" />';
777 if (!empty($inData[
'exclude'])) {
778 $excludedElements =
'<em>' . implode(
', ', array_keys($inData[
'exclude'])) .
'</em><hr/><label for="checkExclude">'
779 . $this->lang->getLL(
'makeconfig_clearAllExclusions',
true)
780 .
'</label> <input type="checkbox" name="tx_impexp[exclude]" id="checkExclude" value="1" />';
782 $excludedElements = $this->lang->getLL(
'makeconfig_noExcludedElementsYet',
true);
785 <tr class="bgColor4">
786 <td><strong>' . $this->lang->getLL(
'makeconfig_excludeElements',
true) .
'</strong>'
788 <td>' . $excludeHiddenFields .
'
789 ' . $excludedElements .
'
794 <tr class="bgColor4">
797 <input class="btn btn-default" type="submit" value="' . $this->lang->getLL(
'makeadvanc_update',
true) .
'" />
798 <input type="hidden" name="tx_impexp[download_export_name]" value="' . substr($nameSuggestion, 0, 30) .
'" />
815 <tr class="tableheader bgColor5">
816 <td colspan="2">' . $this->lang->getLL(
'makeadvanc_softReferences',
true) .
'</td>
819 <tr class="bgColor4">
820 <td><label for="checkExcludeHTMLfileResources"><strong>'
821 . $this->lang->getLL(
'makeadvanc_excludeHtmlCssFile',
true) .
'</strong></label>'
823 <td><input type="checkbox" name="tx_impexp[excludeHTMLfileResources]" id="checkExcludeHTMLfileResources" value="1"'
824 . ($inData[
'excludeHTMLfileResources'] ?
' checked="checked"' :
'') .
' /></td>
829 <tr class="tableheader bgColor5">
830 <td colspan="2">' . $this->lang->getLL(
'makeadvanc_files',
true) .
'</td>
833 <tr class="bgColor4">
834 <td><label for="saveFilesOutsideExportFile"><strong>'
835 . $this->lang->getLL(
'makeadvanc_saveFilesOutsideExportFile',
true) .
'</strong><br />'
836 . $this->lang->getLL(
'makeadvanc_saveFilesOutsideExportFile_limit',
true) .
'</label></td>
837 <td><input type="checkbox" name="tx_impexp[saveFilesOutsideExportFile]" id="saveFilesOutsideExportFile" value="1"'
838 . ($inData[
'saveFilesOutsideExportFile'] ?
' checked="checked"' :
'') .
' /></td>
842 <tr class="tableheader bgColor5">
843 <td colspan="2">' . $this->lang->getLL(
'makeadvanc_extensionDependencies',
true) .
'</td>
846 <tr class="bgColor4">
847 <td><strong>' . $this->lang->getLL(
'makeadvanc_selectExtensionsThatThe',
true) .
'</strong>'
849 <td>' . $this->
extensionSelector(
'tx_impexp[extension_dep]', $inData[
'extension_dep']) .
'</td>
853 <tr class="bgColor4">
856 <input class="btn btn-default" type="submit" value="' . $this->lang->getLL(
'makesavefo_update',
true) .
'" />
857 <input type="hidden" name="tx_impexp[download_export_name]" value="" />
873 <tr class="tableheader bgColor5">
874 <td colspan="2">' . $this->lang->getLL(
'makesavefo_presets',
true) .
'</td>
877 $where =
'(public>0 OR user_uid=' . (int)$this->
getBackendUser()->user[
'uid'] .
')'
878 . ($inData[
'pagetree'][
'id'] ?
' AND (item_uid=' . (int)$inData[
'pagetree'][
'id'] .
' OR item_uid=0)' :
'');
880 if (is_array($presets)) {
881 foreach ($presets as $presetCfg) {
882 $opt[$presetCfg[
'uid']] = $presetCfg[
'title'] .
' [' . $presetCfg[
'uid'] .
']'
883 . ($presetCfg[
'public'] ?
' [Public]' :
'')
884 . ($presetCfg[
'user_uid'] === $this->
getBackendUser()->user[
'uid'] ?
' [Own]' :
'');
888 <tr class="bgColor4">
889 <td><strong>' . $this->lang->getLL(
'makesavefo_presets',
true) .
'</strong>'
892 ' . $this->lang->getLL(
'makesavefo_selectPreset',
true) .
'<br/>
895 <input type="hidden" name="not-set" value="1" id="t3js-submit-field" />
896 <input class="btn btn-default" type="submit" value="' . $this->lang->getLL(
'makesavefo_load',
true) .
'" name="preset[load]" />
897 <input class="btn btn-default t3js-confirm-trigger" type="button" value="' . $this->lang->getLL(
'makesavefo_save',
true) .
'" name="preset[save]" data-title="' . $this->lang->getLL(
'pleaseConfirm',
true) .
'" data-message="' . $this->lang->getLL(
'makesavefo_areYouSure',
true) .
'" />
898 <input class="btn btn-default t3js-confirm-trigger" type="button" value="' . $this->lang->getLL(
'makesavefo_delete',
true) .
'" name="preset[delete]" data-title="' . $this->lang->getLL(
'pleaseConfirm',
true) .
'" data-message="' . $this->lang->getLL(
'makesavefo_areYouSure',
true) .
'" />
899 <input class="btn btn-default t3js-confirm-trigger" type="button" value="' . $this->lang->getLL(
'makesavefo_merge',
true) .
'" name="preset[merge]" data-title="' . $this->lang->getLL(
'pleaseConfirm',
true) .
'" data-message="' . $this->lang->getLL(
'makesavefo_areYouSure',
true) .
'" />
901 ' . $this->lang->getLL(
'makesavefo_titleOfNewPreset',
true) .
'
902 <input type="text" name="tx_impexp[preset][title]" value="'
903 . htmlspecialchars($inData[
'preset'][
'title']) .
'" /><br/>
904 <label for="checkPresetPublic">' . $this->lang->getLL(
'makesavefo_public',
true) .
'</label>
905 <input type="checkbox" name="tx_impexp[preset][public]" id="checkPresetPublic" value="1"'
906 . ($inData[
'preset'][
'public'] ?
' checked="checked"' :
'') .
' /><br/>
911 <tr class="tableheader bgColor5">
912 <td colspan="2">' . $this->lang->getLL(
'makesavefo_outputOptions',
true) .
'</td>
915 $thumbnailFiles = array();
916 foreach ($this->getThumbnailFiles() as $thumbnailFile) {
917 $thumbnailFiles[$thumbnailFile->getCombinedIdentifier()] = $thumbnailFile->getName();
919 if (!empty($thumbnailFiles)) {
920 array_unshift($thumbnailFiles,
'');
923 if (!empty($inData[
'meta'][
'thumbnail'])) {
924 $thumbnail = $this->
getFile($inData[
'meta'][
'thumbnail']);
929 <tr class="bgColor4">
930 <td><strong>' . $this->lang->getLL(
'makesavefo_metaData',
true) .
'</strong>'
933 ' . $this->lang->getLL(
'makesavefo_title',
true) .
' <br/>
934 <input type="text" name="tx_impexp[meta][title]" value="' . htmlspecialchars($inData[
'meta'][
'title']) .
'" /><br/>
935 ' . $this->lang->getLL(
'makesavefo_description',
true) .
' <br/>
936 <input type="text" name="tx_impexp[meta][description]" value="' . htmlspecialchars($inData[
'meta'][
'description']) .
'" /><br/>
937 ' . $this->lang->getLL(
'makesavefo_notes',
true) .
' <br/>
938 <textarea name="tx_impexp[meta][notes]">' . htmlspecialchars($inData[
'meta'][
'notes']) .
'</textarea><br/>
939 ' . (!empty($thumbnailFiles) ?
'
940 ' . $this->lang->getLL(
'makesavefo_thumbnail',
true) .
'<br/>
941 ' . $this->
renderSelectBox(
'tx_impexp[meta][thumbnail]', $inData[
'meta'][
'thumbnail'], $thumbnailFiles) :
'') .
'<br/>
942 ' . ($thumbnail ?
'<img src="' . htmlspecialchars($thumbnail->getPublicUrl(
true)) .
'" vspace="5" style="border: solid black 1px;" alt="" /><br/>' :
'') .
'
943 ' . $this->lang->getLL(
'makesavefo_uploadThumbnail',
true) .
'<br/>
944 ' . ($saveFolder ?
'<input type="file" name="upload_1" size="30" /><br/>
945 <input type="hidden" name="file[upload][1][target]" value="' . htmlspecialchars($saveFolder->getCombinedIdentifier()) .
'" />
946 <input type="hidden" name="file[upload][1][data]" value="1" /><br />' :
'') .
'
951 if ($this->export->compress) {
952 $opt[
't3d_compressed'] = $this->lang->getLL(
'makesavefo_t3dFileCompressed');
954 $opt[
't3d'] = $this->lang->getLL(
'makesavefo_t3dFile');
955 $opt[
'xml'] = $this->lang->getLL(
'makesavefo_xml');
958 $fileName = sprintf($this->lang->getLL(
'makesavefo_filenameSavedInS',
true), $saveFolder->getCombinedIdentifier())
960 <input type="text" name="tx_impexp[filename]" value="'
961 . htmlspecialchars($inData[
'filename']) .
'" /><br/>';
966 <strong>' . $this->lang->getLL(
'makesavefo_fileFormat',
true) .
'</strong>'
970 ' . $this->
renderSelectBox(
'tx_impexp[filetype]', $inData[
'filetype'], $opt) .
'<br/>
971 ' . $this->lang->getLL(
'makesavefo_maxSizeOfFiles',
true) .
'<br/>
972 <input type="text" name="tx_impexp[maxFileSize]" value="' . htmlspecialchars($inData[
'maxFileSize']) .
'" />
982 <input class="btn btn-default" type="submit" value="' . $this->lang->getLL(
'makesavefo_update',
true) .
'" /> -
983 <input class="btn btn-default" type="submit" value="' . $this->lang->getLL(
'makesavefo_downloadExport',
true) .
'" name="tx_impexp[download_export]" />
984 ' . ($saveFolder ?
' - <input class="btn btn-default" type="submit" value="' . $this->lang->getLL(
'importdata_saveToFilename',
true) .
'" name="tx_impexp[save_export]" />' :
'') .
'
1002 public function importData($inData)
1004 $access = is_array($this->pageinfo) ? 1 : 0;
1006 if ($this->
id && $access || $beUser->user[
'admin'] && !$this->id) {
1007 if ($beUser->user[
'admin'] && !$this->id) {
1008 $this->pageinfo = array(
'title' =>
'[root-level]',
'uid' => 0,
'pid' => 0);
1010 if ($inData[
'new_import']) {
1011 unset($inData[
'import_mode']);
1016 $import->update = $inData[
'do_update'];
1017 $import->import_mode = $inData[
'import_mode'];
1018 $import->enableLogging = $inData[
'enableLogging'];
1019 $import->global_ignore_pid = $inData[
'global_ignore_pid'];
1020 $import->force_all_UIDS = $inData[
'force_all_UIDS'];
1021 $import->showDiff = !$inData[
'notShowDiff'];
1022 $import->allowPHPScripts = $inData[
'allowPHPScripts'];
1023 $import->softrefInputValues = $inData[
'softrefInputValues'];
1025 $menuItems = array();
1029 $exportFiles = $this->getExportFiles();
1031 $this->shortcutName .=
' (' . $this->pageinfo[
'title'] .
')';
1035 $selectOptions = array(
'');
1036 foreach ($exportFiles as $file) {
1037 $selectOptions[$file->getCombinedIdentifier()] = $file->getPublicUrl();
1041 <th colspan="2">' . $this->lang->getLL(
'importdata_selectFileToImport',
true) .
'</th>
1043 $noCompressorAvailable = !
$import->compress
1044 ?
'<br /><span class="text-danger">' . $this->lang->getLL(
'importdata_noteNoDecompressorAvailable',
true) .
'</span>'
1049 ' . $this->lang->getLL(
'importdata_file',
true) .
''
1053 ' . $this->
renderSelectBox(
'tx_impexp[file]', $inData[
'file'], $selectOptions) .
'<br />'
1054 . sprintf($this->lang->getLL(
'importdata_fromPathS',
true), $path ? $path->getCombinedIdentifier() : $this->lang->getLL(
'importdata_no_accessible_file_mount',
true)) .
1055 $noCompressorAvailable .
'
1061 ' . $this->lang->getLL(
'importdata_importOptions',
true) .
'
1067 ' . $this->lang->getLL(
'importdata_update',
true)
1071 <input type="checkbox" name="tx_impexp[do_update]" id="checkDo_update" value="1"'
1072 . ($inData[
'do_update'] ?
' checked="checked"' :
'') .
' />
1073 <label for="checkDo_update">' . $this->lang->getLL(
'importdata_updateRecords',
true) .
'</label>
1075 <em>(' . $this->lang->getLL(
'importdata_thisOptionRequiresThat',
true) .
')</em>' . ($inData[
'do_update'] ?
' <hr/>
1076 <input type="checkbox" name="tx_impexp[global_ignore_pid]" id="checkGlobal_ignore_pid" value="1"'
1077 . ($inData[
'global_ignore_pid'] ?
' checked="checked"' :
'') .
' />
1078 <label for="checkGlobal_ignore_pid">' . $this->lang->getLL(
'importdata_ignorePidDifferencesGlobally',
true) .
'</label><br/>
1079 <em>(' . $this->lang->getLL(
'importdata_ifYouSetThis',
true) .
')</em>
1083 $allowPhpScripts = $beUser->isAdmin()
1085 <input type="checkbox" name="tx_impexp[allowPHPScripts]" id="checkAllowPHPScripts" value="1"'
1086 . ($inData[
'allowPHPScripts'] ?
' checked="checked"' :
'') .
' />
1087 <label for="checkAllowPHPScripts">' . $this->lang->getLL(
'importdata_allowToWriteBanned',
true) .
'</label><br/>'
1089 $doUpdate = !$inData[
'do_update'] && $beUser->isAdmin()
1092 <input type="checkbox" name="tx_impexp[force_all_UIDS]" id="checkForce_all_UIDS" value="1"'
1093 . ($inData[
'force_all_UIDS'] ?
' checked="checked"' :
'') .
' />
1094 <label for="checkForce_all_UIDS"><span class="text-danger">'
1095 . $this->lang->getLL(
'importdata_force_all_UIDS',
true) .
'</span></label><br/>
1096 <em>(' . $this->lang->getLL(
'importdata_force_all_UIDS_descr',
true) .
')</em>'
1103 <input type="checkbox" name="tx_impexp[notShowDiff]" id="checkNotShowDiff" value="1"'
1104 . ($inData[
'notShowDiff'] ?
' checked="checked"' :
'') .
' />
1105 <label for="checkNotShowDiff">' . $this->lang->getLL(
'importdata_doNotShowDifferences',
true) .
'</label><br/>
1106 <em>(' . $this->lang->getLL(
'importdata_greenValuesAreFrom',
true) .
')</em>
1109 ' . $allowPhpScripts . $doUpdate .
'
1112 $newImport = !$inData[
'import_file']
1113 ?
'<input class="btn btn-default" type="submit" value="' . $this->lang->getLL(
'importdata_preview',
true) .
'" />' . ($inData[
'file']
1114 ?
' - <input type="hidden" name="not-set" value="1" id="t3js-submit-field" /><input class="btn btn-default t3js-confirm-trigger" type="button" value="' . ($inData[
'do_update']
1115 ? $this->lang->getLL(
'importdata_update_299e',
true)
1116 : $this->lang->getLL(
'importdata_import',
true)) .
'" name="tx_impexp[import_file]" data-title="' . $this->lang->getLL(
'pleaseConfirm',
true) .
'" data-message="' . $this->lang->getLL(
'importdata_areYouSure',
true) .
'" />'
1118 :
'<input class="btn btn-default" type="submit" name="tx_impexp[new_import]" value="' . $this->lang->getLL(
'importdata_newImport',
true) .
'" />';
1125 <input type="hidden" name="tx_impexp[action]" value="import" />
1130 ' . $this->lang->getLL(
'importdata_enableLogging',
true)
1134 <input type="checkbox" name="tx_impexp[enableLogging]" id="checkEnableLogging" value="1"'
1135 . ($inData[
'enableLogging'] ?
' checked="checked"' :
'') .
' />
1136 <label for="checkEnableLogging">' . $this->lang->getLL(
'importdata_writeIndividualDbActions',
true) .
'</label><br/>
1137 <em>(' . $this->lang->getLL(
'importdata_thisIsDisabledBy',
true) .
')</em>
1140 $menuItems[] = array(
1141 'label' => $this->lang->getLL(
'importdata_import',
true),
1143 <table border="0" cellpadding="1" cellspacing="1">
1155 <th colspan="2">' . $this->lang->getLL(
'importdata_uploadFileFromLocal',
true) .
'</th>
1163 <input type="file" name="upload_1" size="40" />
1164 <input type="hidden" name="file[upload][1][target]" value="' . htmlspecialchars($tempFolder->getCombinedIdentifier()) .
'" />
1165 <input type="hidden" name="file[upload][1][data]" value="1" />
1167 <input class="btn btn-default" type="submit" name="_upload" value="' . $this->lang->sL(
'LLL:EXT:lang/locallang_core.xlf:file_upload.php.submit',
true) .
'" />
1168 <input type="checkbox" name="overwriteExistingFiles" id="checkOverwriteExistingFiles" value="1" checked="checked" />
1169 <label for="checkOverwriteExistingFiles">' . $this->lang->sL(
'LLL:EXT:lang/locallang_misc.xlf:overwriteExistingFiles',
true) .
'</label>
1173 $noFileUploaded = $this->fileProcessor->internalUploadMap[1]
1174 ? $this->lang->getLL(
'importdata_success',
true) .
' ' . $this->uploadedFiles[0]->getName()
1175 :
'<span class="text-danger">' . $this->lang->getLL(
'importdata_failureNoFileUploaded',
true) .
'</span>';
1176 $row[] =
'<tr class="bgColor4">
1177 <td>' . $this->lang->getLL(
'importdata_uploadStatus',
true) .
'</td>
1178 <td>' . $noFileUploaded .
'</td>
1181 $menuItems[] = array(
1182 'label' => $this->lang->getLL(
'importdata_upload'),
1184 <table border="0" cellpadding="1" cellspacing="1">
1192 $overviewContent =
'';
1193 $extensionInstallationMessage =
'';
1194 $inFile = $this->
getFile($inData[
'file']);
1195 if ($inFile !== null && $inFile->exists()) {
1197 if (
$import->loadFile($inFile->getForLocalProcessing(
false), 1)) {
1199 $extKeysToInstall = array();
1200 if (is_array(
$import->dat[
'header'][
'extensionDependencies'])) {
1201 foreach (
$import->dat[
'header'][
'extensionDependencies'] as $extKey) {
1202 if (!\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::isLoaded($extKey)) {
1203 $extKeysToInstall[] = $extKey;
1207 if (!empty($extKeysToInstall)) {
1208 $extensionInstallationMessage =
'Before you can install this T3D file you need to install the extensions "'
1209 . implode(
'", "', $extKeysToInstall) .
'".';
1211 if ($inData[
'import_file']) {
1212 if (empty($extKeysToInstall)) {
1213 $import->importData($this->
id);
1218 $overviewContent =
$import->displayContentOverview();
1221 $trow[] =
'<tr class="bgColor5">
1222 <td colspan="2"><strong>' . $this->lang->getLL(
'importdata_metaData',
true) .
'</strong></td>
1224 $trow[] =
'<tr class="bgColor4">
1225 <td><strong>' . $this->lang->getLL(
'importdata_title',
true) .
'</strong></td>
1226 <td width="95%">' . nl2br(htmlspecialchars(
$import->dat[
'header'][
'meta'][
'title'])) .
'</td>
1228 $trow[] =
'<tr class="bgColor4">
1229 <td><strong>' . $this->lang->getLL(
'importdata_description',
true) .
'</strong></td>
1230 <td width="95%">' . nl2br(htmlspecialchars(
$import->dat[
'header'][
'meta'][
'description'])) .
'</td>
1232 $trow[] =
'<tr class="bgColor4">
1233 <td><strong>' . $this->lang->getLL(
'importdata_notes',
true) .
'</strong></td>
1234 <td width="95%">' . nl2br(htmlspecialchars(
$import->dat[
'header'][
'meta'][
'notes'])) .
'</td>
1236 $trow[] =
'<tr class="bgColor4">
1237 <td><strong>' . $this->lang->getLL(
'importdata_packager',
true) .
'</strong></td>
1238 <td width="95%">' . nl2br(htmlspecialchars((
$import->dat[
'header'][
'meta'][
'packager_name']
1239 .
' (' .
$import->dat[
'header'][
'meta'][
'packager_username'] .
')'))) .
'<br/>
1240 ' . $this->lang->getLL(
'importdata_email',
true) .
' '
1241 .
$import->dat[
'header'][
'meta'][
'packager_email'] .
'</td>
1244 if (is_array(
$import->dat[
'header'][
'thumbnail'])) {
1245 $pI = pathinfo(
$import->dat[
'header'][
'thumbnail'][
'filename']);
1248 $fileName = PATH_site .
'typo3temp/importthumb.' . $pI[
'extension'];
1251 if (getimagesize($fileName)) {
1254 .
'" ' .
$import->dat[
'header'][
'thumbnail'][
'imgInfo'][3]
1255 .
' vspace="5" style="border: solid black 1px;" alt="" />';
1256 $trow[] =
'<tr class="bgColor4">
1257 <td><strong>' . $this->lang->getLL(
'importdata_icon',
true) .
'</strong></td>
1258 <td>' . $iconTag .
'</td>
1265 $menuItems[] = array(
1266 'label' => $this->lang->getLL(
'importdata_metaData_1387'),
1268 <table border="0" cellpadding="1" cellspacing="1">
1276 $errors =
$import->printErrorLog();
1277 $menuItems[] = array(
1278 'label' => $this->lang->getLL(
'importdata_messages'),
1279 'content' => $errors,
1280 'stateIcon' => $errors ? 2 : 0
1283 $content = $this->moduleTemplate->getDynamicTabMenu($menuItems,
'tx_impexp_import', 1,
false,
true,
false);
1284 if ($extensionInstallationMessage) {
1285 $content =
'<div style="border: 1px black solid; margin: 10px 10px 10px 10px; padding: 10px 10px 10px 10px;">'
1286 . $this->moduleTemplate->icons(1) . htmlspecialchars($extensionInstallationMessage) .
'</div>' .
$content;
1288 $this->content .=
'<div>' . $content .
'</div>';
1290 if ($overviewContent) {
1291 $this->content .=
'<h2>' . ($inData[
'import_file']
1292 ? $this->lang->getLL(
'importdata_structureHasBeenImported',
true)
1293 : $this->lang->getLL(
'filterpage_structureToBeImported',
true)) .
'</h2><div>' . $overviewContent .
'</div>';
1308 public function processPresets(&$inData)
1316 $inData[
'preset'][
'public'] = (int)$inData[
'preset'][
'public'];
1317 if (isset($presetData[
'save'])) {
1318 $preset = $this->
getPreset($presetData[
'select']);
1320 if (is_array($preset)) {
1321 if ($beUser->isAdmin() || $preset[
'user_uid'] === $beUser->user[
'uid']) {
1322 $fields_values = array(
1323 'public' => $inData[
'preset'][
'public'],
1324 'title' => $inData[
'preset'][
'title'],
1325 'item_uid' => $inData[
'pagetree'][
'id'],
1326 'preset_data' => serialize($inData)
1328 $this->
getDatabaseConnection()->exec_UPDATEquery(
'tx_impexp_presets',
'uid=' . (
int)$preset[
'uid'], $fields_values);
1329 $msg =
'Preset #' . $preset[
'uid'] .
' saved!';
1331 $msg =
'ERROR: The preset was not saved because you were not the owner of it!';
1336 $fields_values = array(
1337 'user_uid' => $beUser->user[
'uid'],
1338 'public' => $inData[
'preset'][
'public'],
1339 'title' => $inData[
'preset'][
'title'],
1340 'item_uid' => $inData[
'pagetree'][
'id'],
1341 'preset_data' => serialize($inData)
1344 $msg =
'New preset "' . htmlspecialchars($inData[
'preset'][
'title']) .
'" is created';
1348 if (isset($presetData[
'delete'])) {
1349 $preset = $this->
getPreset($presetData[
'select']);
1350 if (is_array($preset)) {
1352 if ($beUser->isAdmin() || $preset[
'user_uid'] === $beUser->user[
'uid']) {
1353 $this->
getDatabaseConnection()->exec_DELETEquery(
'tx_impexp_presets',
'uid=' . (
int)$preset[
'uid']);
1354 $msg =
'Preset #' . $preset[
'uid'] .
' deleted!';
1356 $msg =
'ERROR: You were not the owner of the preset so you could not delete it.';
1360 $msg =
'ERROR: No preset selected for deletion.';
1365 if (isset($presetData[
'load']) || isset($presetData[
'merge'])) {
1366 $preset = $this->
getPreset($presetData[
'select']);
1367 if (is_array($preset)) {
1369 $inData_temp = unserialize($preset[
'preset_data']);
1370 if (is_array($inData_temp)) {
1371 if (isset($presetData[
'merge'])) {
1373 if (is_array($inData_temp[
'record'])) {
1374 $inData[
'record'] = array_merge((array)$inData[
'record'], $inData_temp[
'record']);
1377 if (is_array($inData_temp[
'list'])) {
1378 $inData[
'list'] = array_merge((array)$inData[
'list'], $inData_temp[
'list']);
1381 $msg =
'Preset #' . $preset[
'uid'] .
' loaded!';
1382 $inData = $inData_temp;
1385 $msg =
'ERROR: No configuratio data found in preset record!';
1389 $msg =
'ERROR: No preset selected for loading.';
1397 FlashMessage::class,
1402 $this->content .= $flashMessage->render();
1414 return $this->
getDatabaseConnection()->exec_SELECTgetSingleRow(
'*',
'tx_impexp_presets',
'uid=' . (
int)$uid);
1430 $defaultImportExportFolder = null;
1432 $defaultTemporaryFolder = $this->
getBackendUser()->getDefaultUploadTemporaryFolder();
1433 if ($defaultTemporaryFolder !== null) {
1434 $importExportFolderName =
'importexport';
1435 $createFolder = !$defaultTemporaryFolder->hasFolder($importExportFolderName);
1436 if ($createFolder ===
true) {
1438 $defaultImportExportFolder = $defaultTemporaryFolder->createFolder($importExportFolderName);
1439 }
catch (\TYPO3\CMS\Core\Resource\
Exception $folderAccessException) {
1442 $defaultImportExportFolder = $defaultTemporaryFolder->getSubfolder($importExportFolderName);
1446 return $defaultImportExportFolder;
1462 $this->fileProcessor->init(array(),
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'fileExtensions']);
1463 $this->fileProcessor->setActionPermissions();
1469 $httpHost != $refInfo[
'host']
1470 && !
$GLOBALS[
'$TYPO3_CONF_VARS'][
'SYS'][
'doNotCheckReferer']
1473 $this->fileProcessor->writeLog(0, 2, 1,
'Referer host "%s" and server host "%s" did not match!', array($refInfo[
'host'], $httpHost));
1475 $this->fileProcessor->start($file);
1476 $result = $this->fileProcessor->processData();
1477 if (!empty($result[
'upload'])) {
1497 foreach ($optValues as $k => $v) {
1498 $sel = (string)$k === (
string)$value ?
' selected="selected"' :
'';
1502 $opt[] =
'<option value="' . htmlspecialchars($k) .
'"' . $sel .
'>' . htmlspecialchars($v) .
'</option>';
1504 if (!$isSelFlag && (
string)$value !==
'') {
1505 $opt[] =
'<option value="' . htmlspecialchars($value) .
'" selected="selected">'
1506 . htmlspecialchars((
'[\'' . $value .
'\']
')) . '</option>
';
1508 return '<select name=
"' . $prefix . '">
' . implode('', $opt) . '</select>
';
1519 public function tableSelector($prefix, $value, $excludeList = '')
1521 $optValues = array();
1522 if (!GeneralUtility::inList($excludeList, '_ALL
')) {
1523 $optValues['_ALL
'] = '[
' . $this->lang->getLL('ALL_tables
') . ']
';
1525 foreach ($GLOBALS['TCA
'] as $table => $_) {
1526 if ($this->getBackendUser()->check('tables_select
', $table) && !GeneralUtility::inList($excludeList, $table)) {
1527 $optValues[$table] = $table;
1532 $opt[] = '<option value=
""></option>
';
1534 foreach ($optValues as $k => $v) {
1535 if (is_array($value)) {
1536 $sel = in_array($k, $value) ? ' selected=
"selected"' : '';
1538 $opt[] = '<option value=
"' . htmlspecialchars($k) . '"' . $sel . '>
' . htmlspecialchars($v) . '</option>
';
1540 return '<select name=
"' . $prefix . '[]" multiple=
"multiple" size=
"'
1541 . MathUtility::forceIntegerInRange(count($opt), 5, 10) . '">
' . implode('', $opt) . '</select>
';
1551 public function extensionSelector($prefix, $value)
1553 $loadedExtensions = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::getLoadedExtensionListArray();
1557 $opt[] = '<option value=
""></option>
';
1558 foreach ($loadedExtensions as $extensionKey) {
1560 if (is_array($value)) {
1561 $sel = in_array($extensionKey, $value) ? ' selected=
"selected"' : '';
1563 $opt[] = '<option value=
"' . htmlspecialchars($extensionKey) . '"' . $sel . '>
'
1564 . htmlspecialchars($extensionKey) . '</option>
';
1566 return '<select name=
"' . $prefix . '[]" multiple=
"multiple" size=
"'
1567 . MathUtility::forceIntegerInRange(count($opt), 5, 10) . '">
' . implode('', $opt) . '</select>
';
1577 public function filterPageIds($exclude)
1580 $exclude = array_keys($exclude);
1583 foreach ($exclude as $element) {
1584 list($table, $uid) = explode(':
', $element);
1585 if ($table === 'pages
') {
1586 $pageIds[] = (int)$uid;
1590 if (!empty($pageIds)) {
1591 return ' AND uid NOT IN (
' . implode(',
', $pageIds) . ')
';
1599 protected function getBackendUser()
1601 return $GLOBALS['BE_USER
'];
1607 protected function getDatabaseConnection()
1609 return $GLOBALS['TYPO3_DB
'];
1615 protected function getLanguageService()
1617 return $GLOBALS['LANG
'];
1626 protected function getThumbnailFiles()
1628 $thumbnailFiles = array();
1629 $defaultTemporaryFolder = $this->getDefaultImportExportFolder();
1631 if ($defaultTemporaryFolder === null) {
1632 return $thumbnailFiles;
1636 $filter = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Resource\Filter\FileExtensionFilter::class);
1637 $filter->setAllowedFileExtensions(array('png
', 'gif
', 'jpg
'));
1638 $defaultTemporaryFolder->getStorage()->addFileAndFolderNameFilter(array($filter, 'filterFileList
'));
1639 $thumbnailFiles = $defaultTemporaryFolder->getFiles();
1641 return $thumbnailFiles;
1650 protected function getExportFiles()
1652 $exportFiles = array();
1654 $folder = $this->getDefaultImportExportFolder();
1655 if ($folder !== null) {
1658 $filter = GeneralUtility::makeInstance(\TYPO3\CMS\Core\Resource\Filter\FileExtensionFilter::class);
1659 $filter->setAllowedFileExtensions(array('t3d
', 'xml
'));
1660 $folder->getStorage()->addFileAndFolderNameFilter(array($filter, 'filterFileList
'));
1662 $exportFiles = $folder->getFiles();
1665 return $exportFiles;
1674 protected function getFile($combinedIdentifier)
1677 $file = \TYPO3\CMS\Core\Resource\ResourceFactory::getInstance()->getFileObjectFromCombinedIdentifier($combinedIdentifier);
1678 } catch (\Exception $exception) {