Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
sg_mail
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TYPO3
sg_mail
Commits
ad8783cf
Commit
ad8783cf
authored
6 years ago
by
Stefan Galinski
Browse files
Options
Downloads
Patches
Plain Diff
[BUGFIX] Mail templates in forms can't be registerd if user_uploads is selected
parent
4c169c16
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!11
Feature security update
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Classes/XClass/Form/FormEditorController.php
+16
-1
16 additions, 1 deletion
Classes/XClass/Form/FormEditorController.php
with
16 additions
and
1 deletion
Classes/XClass/Form/FormEditorController.php
+
16
−
1
View file @
ad8783cf
...
...
@@ -31,6 +31,8 @@ use SGalinski\SgMail\Service\TypoScriptSettingsService;
use
Symfony\Component\Yaml\Yaml
;
use
TYPO3\CMS\Core\Cache\CacheManager
;
use
TYPO3\CMS\Core\Cache\Frontend\FrontendInterface
;
use
TYPO3\CMS\Core\Resource\ResourceStorage
;
use
TYPO3\CMS\Core\Resource\StorageRepository
;
use
TYPO3\CMS\Core\Utility\GeneralUtility
;
use
TYPO3\CMS\Extbase\Object\ObjectManager
;
use
TYPO3\CMS\Form\Type\FormDefinitionArray
;
...
...
@@ -108,7 +110,20 @@ class FormEditorController extends \TYPO3\CMS\Form\Controller\FormEditorControll
}
// parse yaml for form fields
$absoluteFilePath
=
GeneralUtility
::
getFileAbsFileName
(
$formPersistenceIdentifier
);
if
(
strpos
(
$formPersistenceIdentifier
,
'EXT:'
)
===
0
)
{
$absoluteFilePath
=
GeneralUtility
::
getFileAbsFileName
(
$formPersistenceIdentifier
);
}
else
{
list
(
$storageUid
,
$fileIdentifier
)
=
explode
(
':'
,
$formPersistenceIdentifier
,
2
);
$storageRepository
=
$this
->
objectManager
->
get
(
StorageRepository
::
class
);
$storage
=
$storageRepository
->
findByUid
(
$storageUid
);
if
(
!
$storage
instanceof
ResourceStorage
||
!
$storage
->
isBrowsable
())
{
throw
new
\InvalidArgumentException
(
sprintf
(
'Could not access storage with uid "%d".'
,
$storageUid
)
);
}
$absoluteFilePath
=
$storage
->
getFile
(
$fileIdentifier
);
}
$parsedYaml
=
Yaml
::
parse
(
file_get_contents
(
$absoluteFilePath
));
$renderables
=
[];
...
...
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