Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
services
t3o sites
extensions.typo3.org
extensions.typo3.org
Commits
11c55741
Commit
11c55741
authored
Jan 17, 2022
by
Thomas Löffler
Browse files
[TASK] Use rector for v11 compatibility of EXT:ter
parent
cc77a576
Pipeline
#22187
failed with stages
in 3 minutes and 25 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
extensions/ter/Classes/Api/ExtensionKey.php
View file @
11c55741
...
...
@@ -19,6 +19,7 @@ use T3o\Ter\Exception\InvalidExtensionKeyFormatException;
use
T3o\Ter\Exception\UnauthorizedException
;
use
T3o\Ter\Exception\UserNotFoundException
;
use
T3o\Ter\Exception\VersionExistsException
;
use
TYPO3\CMS\Core\Context\Context
;
use
TYPO3\CMS\Core\Database\ConnectionPool
;
use
TYPO3\CMS\Core\Database\Query\Restriction\FrontendRestrictionContainer
;
use
TYPO3\CMS\Core\Utility\ExtensionManagementUtility
;
...
...
@@ -151,10 +152,12 @@ class ExtensionKey
throw
new
UserNotFoundException
(
'The requested user does not exist, so it cannot be used as owner'
);
}
$time
=
GeneralUtility
::
makeInstance
(
Context
::
class
)
->
getPropertyFromAspect
(
'date'
,
'timestamp'
);
$extensionKeysRow
=
[
'pid'
=>
GeneralUtility
::
makeInstance
(
Configuration
::
class
)
->
getStoragePid
(),
'tstamp'
=>
$
GLOBALS
[
'EXEC_TIME'
]
,
'crdate'
=>
$
GLOBALS
[
'EXEC_TIME'
]
,
'tstamp'
=>
$
time
,
'crdate'
=>
$
time
,
'ext_key'
=>
$this
->
extensionKey
,
'frontend_user'
=>
$ownerUserName
,
'last_upload'
=>
0
,
...
...
@@ -340,7 +343,7 @@ class ExtensionKey
// Bad prefixes:
$badPrefixesArr
=
[
'tx'
,
'user_'
,
'pages'
,
'tt_'
,
'sys_'
,
'ts_language_'
,
'csh_'
];
foreach
(
$badPrefixesArr
as
$prefix
)
{
if
(
GeneralUtility
::
isFir
st
P
art
OfStr
(
$extensionKey
,
$prefix
))
{
if
(
\
str_
start
s_with
(
$extensionKey
,
$prefix
))
{
return
false
;
}
}
...
...
@@ -357,7 +360,7 @@ class ExtensionKey
$connection
->
update
(
'tx_terfe2_domain_model_extension'
,
[
'tstamp'
=>
$GLOBALS
[
'SIM_EXEC_TIME'
]
,
'tstamp'
=>
GeneralUtility
::
makeInstance
(
Context
::
class
)
->
getPropertyFromAspect
(
'date'
,
'timestamp'
)
,
'versions'
=>
$this
->
getNumberOfVersions
(),
'last_version'
=>
$this
->
getHighestVersion
()
],
...
...
extensions/ter/Classes/Api/ExtensionVersion.php
View file @
11c55741
...
...
@@ -25,6 +25,7 @@ use T3o\TerFe2\Utility\ArchiveUtility;
use
T3o\TerFe2\Utility\CategoryUtility
;
use
T3o\TerFe2\Utility\VersionUtility
;
use
TYPO3\CMS\Core\Cache\CacheManager
;
use
TYPO3\CMS\Core\Context\Context
;
use
TYPO3\CMS\Core\Database\ConnectionPool
;
use
TYPO3\CMS\Core\Mail\FluidEmail
;
use
TYPO3\CMS\Core\Mail\Mailer
;
...
...
@@ -523,18 +524,19 @@ class ExtensionVersion
$category
=
(
string
)
$extensionInfoData
->
metaData
->
category
;
$t3xFile
=
$this
->
getStoragePrefix
()
.
'.t3x'
;
$time
=
(
int
)
GeneralUtility
::
makeInstance
(
Context
::
class
)
->
getPropertyFromAspect
(
'date'
,
'timestamp'
);
$insertVersion
=
[
'pid'
=>
GeneralUtility
::
makeInstance
(
Configuration
::
class
)
->
getStoragePid
(),
'crdate'
=>
(
int
)
$GLOBALS
[
'SIM_EXEC_TIME'
]
,
'tstamp'
=>
(
int
)
$GLOBALS
[
'SIM_EXEC_TIME'
]
,
'crdate'
=>
$time
,
'tstamp'
=>
$time
,
'extension'
=>
$extUid
,
'title'
=>
$extensionInfoData
->
metaData
->
title
,
'description'
=>
$extensionInfoData
->
metaData
->
description
,
'author'
=>
$this
->
createAuthor
(
$extensionInfoData
->
metaData
,
$uploaderUserName
),
'version_number'
=>
VersionNumberUtility
::
convertVersionNumberToInteger
(
$this
->
version
),
'version_string'
=>
$this
->
version
,
'upload_date'
=>
$
GLOBALS
[
'SIM_EXEC_TIME'
]
,
'upload_date'
=>
$
time
,
'upload_comment'
=>
(
string
)
$extensionInfoData
->
infoData
->
uploadComment
,
'file_hash'
=>
$t3xCheckSum
,
'download_counter'
=>
0
,
...
...
extensions/ter/ext_localconf.php
View file @
11c55741
<?php
if
(
!
defined
(
'TYPO3
_MODE
'
))
{
if
(
!
defined
(
'TYPO3'
))
{
die
(
'Access denied.'
);
}
...
...
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