Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
fdf8c10b
Commit
fdf8c10b
authored
Sep 13, 2018
by
Elias Villiger
Browse files
Feature #4922 - Excel import more stable
parent
6075fad6
Pipeline
#876
passed with stage
in 1 minute and 50 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extension/qfq/qfq/Save.php
View file @
fdf8c10b
...
...
@@ -13,6 +13,7 @@ require_once(__DIR__ . '/store/Sip.php');
require_once
(
__DIR__
.
'/Constants.php'
);
require_once
(
__DIR__
.
'/Evaluate.php'
);
require_once
(
__DIR__
.
'/helper/HelperFile.php'
);
require_once
(
__DIR__
.
'/helper/OnArray.php'
);
//require_once(__DIR__ . '/../qfq/exceptions/UserException.php');
//require_once(__DIR__ . '/../qfq/exceptions/CodeException.php');
//require_once(__DIR__ . '/../qfq/exceptions/DbException.php');
...
...
@@ -558,7 +559,7 @@ class Save {
return
false
;
}
if
(
isset
(
$formElement
[
FE_IMPORT_TO_TABLE
]))
{
if
(
isset
(
$formElement
[
FE_IMPORT_TO_TABLE
])
&&
isset
(
$statusUpload
[
FILES_TMP_NAME
])
)
{
// Import
$tmpFile
=
Support
::
extendFilename
(
$statusUpload
[
FILES_TMP_NAME
],
UPLOAD_CACHED
);
$this
->
doImport
(
$formElement
,
$tmpFile
);
...
...
@@ -634,13 +635,13 @@ class Save {
}
$tableName
=
$formElement
[
FE_IMPORT_TO_TABLE
];
$regions
=
explode
(
'|'
,
$formElement
[
FE_IMPORT_REGION
]
??
''
);
$columnNames
=
explode
(
','
,
$formElement
[
FE_IMPORT_TO_COLUMNS
]);
$regions
=
OnArray
::
trimArray
(
explode
(
'|'
,
$formElement
[
FE_IMPORT_REGION
]
??
''
)
)
;
$columnNames
=
OnArray
::
trimArray
(
explode
(
','
,
$formElement
[
FE_IMPORT_TO_COLUMNS
])
)
;
$importMode
=
$formElement
[
FE_IMPORT_MODE
]
??
FE_IMPORT_MODE_APPEND
;
foreach
(
$regions
as
$region
)
{
// region: tab, startColumn, startRow, endColumn, endRow
$region
=
explode
(
','
,
$region
);
$region
=
OnArray
::
trimArray
(
explode
(
','
,
$region
)
)
;
$tab
=
1
;
if
(
!
empty
(
$region
[
0
]))
{
$tab
=
$region
[
0
];
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment