Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
TYPO3
sg_mail
Commits
e44e9268
Commit
e44e9268
authored
Apr 15, 2021
by
Kevin Ditscheid
Browse files
[TASK] Cleanup
parent
57d02059
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
5 additions
and
132 deletions
+5
-132
Classes/Controller/AbstractController.php
Classes/Controller/AbstractController.php
+0
-2
Classes/Service/BackendService.php
Classes/Service/BackendService.php
+0
-7
Classes/Session/PhpSession.php
Classes/Session/PhpSession.php
+0
-123
Classes/Updates/LanguageMigrationUpdate.php
Classes/Updates/LanguageMigrationUpdate.php
+5
-0
No files found.
Classes/Controller/AbstractController.php
View file @
e44e9268
...
...
@@ -25,7 +25,6 @@
namespace
SGalinski\SgMail\Controller
;
use
SGalinski\SgMail\Service\BackendService
;
use
SGalinski\SgMail\Service\RegisterService
;
use
TYPO3\CMS\Backend\Template\Components\ButtonBar
;
use
TYPO3\CMS\Backend\Template\Components\DocHeaderComponent
;
...
...
@@ -37,7 +36,6 @@ use TYPO3\CMS\Core\Imaging\IconFactory;
use
TYPO3\CMS\Core\Messaging\FlashMessage
;
use
TYPO3\CMS\Core\Utility\GeneralUtility
;
use
TYPO3\CMS\Extbase\Mvc\Controller\ActionController
;
use
TYPO3\CMS\Extbase\Mvc\Request
;
use
TYPO3\CMS\Extbase\Utility\LocalizationUtility
;
use
function
count
;
...
...
Classes/Service/BackendService.php
View file @
e44e9268
...
...
@@ -27,21 +27,14 @@ namespace SGalinski\SgMail\Service;
use
InvalidArgumentException
;
use
SGalinski\SgMail\Domain\Repository\FrontendUserGroupRepository
;
use
SGalinski\SgMail\Domain\Repository\MailRepository
;
use
TYPO3\CMS\Backend\Template\Components\ButtonBar
;
use
TYPO3\CMS\Backend\Template\Components\DocHeaderComponent
;
use
TYPO3\CMS\Backend\Utility\BackendUtility
;
use
TYPO3\CMS\Core\Database\Connection
;
use
TYPO3\CMS\Core\Database\ConnectionPool
;
use
TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction
;
use
TYPO3\CMS\Core\Imaging\Icon
;
use
TYPO3\CMS\Core\Imaging\IconFactory
;
use
TYPO3\CMS\Core\Utility\GeneralUtility
;
use
TYPO3\CMS\Core\Utility\VersionNumberUtility
;
use
TYPO3\CMS\Extbase\Mvc\Request
;
use
TYPO3\CMS\Extbase\Object\Exception
;
use
TYPO3\CMS\Extbase\Object\ObjectManager
;
use
TYPO3\CMS\Extbase\Utility\LocalizationUtility
;
use
UnexpectedValueException
;
use
function
count
;
use
function
in_array
;
...
...
Classes/Session/PhpSession.php
deleted
100644 → 0
View file @
57d02059
<?php
/***************************************************************
* Copyright notice
*
* (c) sgalinski Internet Services (https://www.sgalinski.de)
*
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
* free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* The GNU General Public License can be found at
* http://www.gnu.org/copyleft/gpl.html.
*
* This script is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* This copyright notice MUST APPEAR in all copies of the script!
***************************************************************/
namespace
SGalinski\SgMail\Session
;
use
TYPO3\CMS\Core\SingletonInterface
;
/**
* PHP Session handler
*/
class
PhpSession
implements
SingletonInterface
{
/**
* @var string
*/
protected
$sessionKey
;
/**
* Constructor
*/
public
function
__construct
()
{
session_start
();
$this
->
sessionKey
=
uniqid
(
'sgalinski'
,
TRUE
);
}
/**
* @param string $sessionKey
* @return void
*/
public
function
setSessionKey
(
string
$sessionKey
):
void
{
$this
->
sessionKey
=
$sessionKey
;
}
/**
* Returns the current session key
*
* @return string
*/
public
function
getSessionKey
():
string
{
return
$this
->
sessionKey
;
}
/**
* Exchanges the complete session data
*
* @param mixed $data
* @return void
*/
public
function
exchangeData
(
$data
):
void
{
$this
->
destroy
();
$_SESSION
[
$this
->
sessionKey
]
=
$data
;
}
/**
* Returns the complete session data
*
* @return mixed
*/
public
function
getData
()
{
return
$_SESSION
[
$this
->
sessionKey
];
}
/**
* Sets data inside the session below the given key
*
* @param string $key
* @param mixed $data
* @return void
*/
public
function
setDataByKey
(
string
$key
,
$data
):
void
{
$_SESSION
[
$this
->
sessionKey
][
$key
]
=
$data
;
}
/**
* Returns data of the session defined by the given key
*
* @param string $key
* @return mixed
*/
public
function
getDataByKey
(
string
$key
)
{
return
$_SESSION
[
$this
->
sessionKey
][
$key
];
}
/**
* Removes data defined by the given key.
*
* @param string $key
* @return void
*/
public
function
unsetDataByKey
(
string
$key
):
void
{
unset
(
$_SESSION
[
$this
->
sessionKey
][
$key
]);
}
/**
* Removes all session data
*
* @return void
*/
public
function
destroy
():
void
{
unset
(
$_SESSION
[
$this
->
sessionKey
]);
}
}
Classes/Updates/LanguageMigrationUpdate.php
View file @
e44e9268
...
...
@@ -31,6 +31,11 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
use
TYPO3\CMS\Install\Updates\DatabaseUpdatedPrerequisite
;
use
TYPO3\CMS\Install\Updates\UpgradeWizardInterface
;
/**
* Class LanguageMigrationUpdate
*
* @package SGalinski\SgMail\Updates
*/
class
LanguageMigrationUpdate
implements
UpgradeWizardInterface
{
public
const
IDENTIFIER
=
'sgmail_languagemigrationupdate'
;
...
...
Write
Preview
Markdown
is supported
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