Commit 567048c0 authored by Georg Ringer's avatar Georg Ringer Committed by Morton Jonuschat
Browse files

[BUGFIX] Re-enable export of multiple records via clipboard

The change of #57873 introduced a regression which doesn't allow
the export of multiple records via the clipboard module anymore.

The wrong parameter generation is fixed with this patch.

Resolves: #59180
Releases: master
Change-Id: Iffa9e0ec4b816903bd935c65e5f9ba7230695802
Reviewed-on: http://review.typo3.org/35887

Reviewed-by: default avatarDaniel Goerz <ervaude@gmail.com>
Tested-by: default avatarDaniel Goerz <ervaude@gmail.com>
Reviewed-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
Tested-by: default avatarMorton Jonuschat <m.jonuschat@mojocode.de>
parent 71d1f6c7
......@@ -748,7 +748,7 @@ class Clipboard
// Init
$pad = $this->current;
$params = array();
$params['tx_impexp[action]'] = 'export';
$params['tx_impexp']['action'] = 'export';
// Traverse items:
if (is_array($this->clipData[$pad]['el'])) {
foreach ($this->clipData[$pad]['el'] as $k => $v) {
......@@ -757,13 +757,13 @@ class Clipboard
// Rendering files/directories on the clipboard
if ($table == '_FILE') {
if (file_exists($v) && GeneralUtility::isAllowedAbsPath($v)) {
$params['tx_impexp[' . (is_dir($v) ? 'dir' : 'file') . '][]'] = $v;
$params['tx_impexp'][is_dir($v) ? 'dir' : 'file'][] = $v;
}
} else {
// Rendering records:
$rec = BackendUtility::getRecord($table, $uid);
if (is_array($rec)) {
$params['tx_impexp[record][]'] = $table . ':' . $uid;
$params['tx_impexp']['record'][] = $table . ':' . $uid;
}
}
}
......
......@@ -666,12 +666,14 @@ class ImportExportController extends \TYPO3\CMS\Backend\Module\BaseScriptClass
$rUid = $rParts[1];
$nameSuggestion .= $tName . '_' . $rUid;
$rec = BackendUtility::getRecordWSOL($tName, $rUid);
$row[] = '
<tr class="bgColor4">
<td><strong>' . $this->lang->getLL('makeconfig_record', true) . '</strong></td>
<td>' . $this->iconFactory->getIconForRecord($tName, $rec, Icon::SIZE_SMALL)->render() . BackendUtility::getRecordTitle($tName, $rec, true)
. '<input type="hidden" name="tx_impexp[record][]" value="' . htmlspecialchars(($tName . ':' . $rUid)) . '" /></td>
</tr>';
if (!empty($rec)) {
$row[] = '
<tr class="bgColor4">
<td><strong>' . $this->lang->getLL('makeconfig_record', true) . '</strong></td>
<td>' . $this->iconFactory->getIconForRecord($tName, $rec, Icon::SIZE_SMALL)->render() . BackendUtility::getRecordTitle($tName, $rec, true)
. '<input type="hidden" name="tx_impexp[record][]" value="' . htmlspecialchars(($tName . ':' . $rUid)) . '" /></td>
</tr>';
}
}
}
// Single tables/pids:
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment