Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
migrate_source_ui
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
migrate_source_ui
Commits
d2b1543d
Commit
d2b1543d
authored
9 months ago
by
Benji Fisher
Committed by
Lucas Hedding
9 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3480275
by benjifisher, heddn: File validation changed in Drupal 10.2
parent
6167e75f
Branches
Branches containing commit
Tags
8.x-1.2
Tags containing commit
1 merge request
!8
Use the array of validators in the correct format depending on the version of Drupal
Pipeline
#379774
passed with warnings
7 months ago
Stage: .pre
Stage: build
Stage: validate
Stage: test
Changes
2
Pipelines
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
migrate_source_ui.info.yml
+1
-1
1 addition, 1 deletion
migrate_source_ui.info.yml
src/Form/MigrateSourceUiForm.php
+3
-3
3 additions, 3 deletions
src/Form/MigrateSourceUiForm.php
with
4 additions
and
4 deletions
migrate_source_ui.info.yml
+
1
−
1
View file @
d2b1543d
name
:
Migrate Source UI
type
:
module
description
:
UI for CSV, XML or JSON sources.
core_version_requirement
:
^10.
1
|| ^11
core_version_requirement
:
^10.
2
|| ^11
package
:
Migrate
configure
:
migrate_source_ui.form
...
...
This diff is collapsed.
Click to expand it.
src/Form/MigrateSourceUiForm.php
+
3
−
3
View file @
d2b1543d
...
...
@@ -107,8 +107,8 @@ class MigrateSourceUiForm extends FormBase {
'#type'
=>
'file'
,
'#title'
=>
$this
->
t
(
'Upload the source file'
),
'#upload_validators'
=>
[
'
f
ile
_validate_e
xtension
s
'
=>
[
'json csv xml'
,
'
F
ile
E
xtension'
=>
[
'extensions'
=>
'json csv xml'
,
],
],
];
...
...
@@ -135,7 +135,7 @@ class MigrateSourceUiForm extends FormBase {
$migrationInstance
=
$this
->
pluginManagerMigration
->
createStubMigration
(
$definition
);
$extension
=
$this
->
getFileExtensionSupported
(
$migrationInstance
);
$validators
=
[
'
f
ile
_validate_
extensions'
=>
[
$extension
]];
$validators
=
[
'
F
ile
Extension'
=>
[
'
extensions'
=>
$extension
]];
// Check to see if a specific file temp directory is configured. If not,
// default the value to FALSE, which will instruct file_save_upload() to
// use Drupal's temporary files scheme.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment