Commit 84e50d22 authored by Martin's avatar Martin Committed by Daniel Goerz
Browse files

[TASK] Add forceUid option to Import Command

Add possibility to force UIDs from Command Line
when importing a t3d/xml file.

Releases: master
Resolves: #87414
Change-Id: I2117079fb0a4af46355448256750978075749fb3
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/59416

Reviewed-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
Reviewed-by: Daniel Goerz's avatarDaniel Goerz <daniel.goerz@posteo.de>
Tested-by: default avatarTYPO3com <noreply@typo3.com>
Tested-by: Susanne Moog's avatarSusanne Moog <look@susi.dev>
Tested-by: Daniel Goerz's avatarDaniel Goerz <daniel.goerz@posteo.de>
parent 3fa18fab
......@@ -55,6 +55,11 @@ class ImportCommand extends Command
null,
InputOption::VALUE_NONE,
'If set, page IDs of updated records are not corrected (only works in conjunction with the updateRecords option)'
)->addOption(
'forceUid',
null,
InputOption::VALUE_NONE,
'If set, UIDs from file will be forced.'
)->addOption(
'enableLog',
null,
......@@ -89,6 +94,8 @@ class ImportCommand extends Command
$import->update = (bool)($input->hasOption('updateRecords') && $input->getOption('updateRecords'));
// Only used when $updateRecords is "true"
$import->global_ignore_pid = (bool)($input->hasOption('ignorePid') && $input->getOption('ignorePid'));
// Force using UIDs from File
$import->force_all_UIDS = (bool)($input->hasOption('forceUid') && $input->getOption('forceUid'));
// Enables logging of database actions
$import->enableLogging = (bool)($input->hasOption('enableLog') && $input->getOption('enableLog'));
......
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