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
459cd1e4
Commit
459cd1e4
authored
5 years ago
by
Torsten Oppermann
Browse files
Options
Downloads
Patches
Plain Diff
[TASK] Smaller cleanups
parent
7a8d385f
No related branches found
No related tags found
1 merge request
!14
Cleanups
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Classes/Service/PlaintextService.php
+1
-1
1 addition, 1 deletion
Classes/Service/PlaintextService.php
Classes/Service/RegisterService.php
+9
-9
9 additions, 9 deletions
Classes/Service/RegisterService.php
with
10 additions
and
10 deletions
Classes/Service/PlaintextService.php
+
1
−
1
View file @
459cd1e4
...
...
@@ -99,7 +99,7 @@ class PlaintextService {
* @param string $content
* @return array
*/
protected
function
addLineBreaks
(
$content
)
{
protected
function
addLineBreaks
(
$content
)
:
array
{
$tags2LineBreaks
=
[
'</p>'
,
'</tr>'
,
...
...
This diff is collapsed.
Click to expand it.
Classes/Service/RegisterService.php
+
9
−
9
View file @
459cd1e4
...
...
@@ -130,9 +130,9 @@ class RegisterService implements \TYPO3\CMS\Core\SingletonInterface {
$pathAsArray
=
GeneralUtility
::
trimExplode
(
'/'
,
$pathToRegistrationFile
);
$filename
=
$pathAsArray
[
\count
(
$pathAsArray
)
-
1
];
$filenameWithoutHash
=
GeneralUtility
::
trimExplode
(
'_'
,
$filename
,
FALSE
,
2
)[
1
];
$hash
=
md5
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'SYS'
][
'encryptionKey'
]
.
'|'
.
$filenameWithoutHash
);
$hash
=
\
md5
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'SYS'
][
'encryptionKey'
]
.
'|'
.
$filenameWithoutHash
);
// if the filename doesn't start with the hash value, ignore it
if
(
strpos
(
$filename
,
$hash
)
!==
0
)
{
if
(
\
strpos
(
$filename
,
$hash
)
!==
0
)
{
continue
;
}
...
...
@@ -240,7 +240,7 @@ class RegisterService implements \TYPO3\CMS\Core\SingletonInterface {
$registerFolder
=
GeneralUtility
::
getFileAbsFileName
(
$configurationLocation
);
GeneralUtility
::
mkdir_deep
(
$registerFolder
);
$hashPrefix
=
md5
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'SYS'
][
'encryptionKey'
]
.
'|'
.
$templateKey
.
'.php'
);
$hashPrefix
=
\
md5
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'SYS'
][
'encryptionKey'
]
.
'|'
.
$templateKey
.
'.php'
);
$registerFile
=
GeneralUtility
::
getFileAbsFileName
(
$registerFolder
.
'/'
.
$hashPrefix
.
'_'
.
$templateKey
.
'.php'
);
...
...
@@ -268,7 +268,7 @@ class RegisterService implements \TYPO3\CMS\Core\SingletonInterface {
];
}
file_put_contents
(
$registerFile
,
'<?php return '
.
var_export
(
$newRegisterArray
,
TRUE
)
.
';'
);
\
file_put_contents
(
$registerFile
,
'<?php return '
.
\
var_export
(
$newRegisterArray
,
TRUE
)
.
';'
);
return
$registerFile
;
}
...
...
@@ -283,11 +283,11 @@ class RegisterService implements \TYPO3\CMS\Core\SingletonInterface {
$registerFolder
=
GeneralUtility
::
getFileAbsFileName
(
$configurationLocation
);
GeneralUtility
::
mkdir_deep
(
$registerFolder
);
$hashPrefix
=
md5
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'SYS'
][
'encryptionKey'
]
.
'|'
.
$templateKey
.
'.php'
);
$hashPrefix
=
\
md5
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'SYS'
][
'encryptionKey'
]
.
'|'
.
$templateKey
.
'.php'
);
$registerFile
=
GeneralUtility
::
getFileAbsFileName
(
$registerFolder
.
'/'
.
$hashPrefix
.
'_'
.
$templateKey
.
'.php'
);
if
(
file_exists
(
$registerFile
))
{
if
(
\
file_exists
(
$registerFile
))
{
\unlink
(
$registerFile
);
}
}
...
...
@@ -340,13 +340,13 @@ class RegisterService implements \TYPO3\CMS\Core\SingletonInterface {
GeneralUtility
::
mkdir_deep
(
$registerFolder
);
if
(
$filePath
===
''
)
{
$hashPrefix
=
md5
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'SYS'
][
'encryptionKey'
]
.
'|'
.
$templateName
.
'.php'
);
$hashPrefix
=
\
md5
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'SYS'
][
'encryptionKey'
]
.
'|'
.
$templateName
.
'.php'
);
$filePath
=
GeneralUtility
::
getFileAbsFileName
(
$registerFolder
.
'/'
.
$hashPrefix
.
'_'
.
$templateName
.
'.php'
);
}
if
(
file_exists
(
$filePath
))
{
if
(
\
file_exists
(
$filePath
))
{
$success
=
\unlink
(
$filePath
);
}
else
{
return
FALSE
;
...
...
@@ -383,7 +383,7 @@ class RegisterService implements \TYPO3\CMS\Core\SingletonInterface {
$registerFolder
=
GeneralUtility
::
getFileAbsFileName
(
$configurationLocation
);
GeneralUtility
::
mkdir_deep
(
$registerFolder
);
$hashPrefix
=
md5
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'SYS'
][
'encryptionKey'
]
.
'|'
.
$templateName
.
'.php'
);
$hashPrefix
=
\
md5
(
$GLOBALS
[
'TYPO3_CONF_VARS'
][
'SYS'
][
'encryptionKey'
]
.
'|'
.
$templateName
.
'.php'
);
$filePath
=
GeneralUtility
::
getFileAbsFileName
(
$registerFolder
.
'/'
.
$hashPrefix
.
'_'
.
$templateName
.
'.php'
);
...
...
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