Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
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
7ed9d438
Commit
7ed9d438
authored
Mar 09, 2018
by
Andreas Fernandez
Browse files
Check if files exist and drop fileadmin/ter/ prefix
parent
966eb5d4
Pipeline
#3807
passed with stages
in 5 minutes and 33 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
html/typo3conf/ext/ter/class.tx_ter_helper.php
View file @
7ed9d438
...
...
@@ -432,9 +432,16 @@ class tx_ter_helper
$versionObj
->
appendChild
(
new
DOMElement
(
'reviewstate'
,
intval
(
$extensionVersionArr
[
'reviewstate'
])));
$versionObj
->
appendChild
(
new
DOMElement
(
'category'
,
$this
->
xmlentities
(
$extensionVersionArr
[
'category'
])));
if
(
$extensionVersionArr
[
'category'
]
===
'distribution'
)
{
$prefixPathToDistributionFiles
=
'fileadmin/ter/'
.
$extensionKey
[
0
]
.
'/'
.
$extensionKey
[
1
]
.
'/'
.
$extensionKey
.
'_'
.
$versionNumber
.
'_'
;
$versionObj
->
appendChild
(
new
DOMElement
(
'distributionImage'
,
$this
->
xmlentities
(
$prefixPathToDistributionFiles
.
'Distribution.png'
)));
$versionObj
->
appendChild
(
new
DOMElement
(
'distributionImageWelcome'
,
$this
->
xmlentities
(
$prefixPathToDistributionFiles
.
'DistributionWelcome.png'
)));
$prefixPathOnServer
=
PATH_site
.
'fileadmin/ter/'
;
$prefixDistributionFilePath
=
$extensionKey
[
0
]
.
'/'
.
$extensionKey
[
1
]
.
'/'
.
$extensionKey
.
'_'
.
$versionNumber
.
'_'
;
$distributionImage
=
$prefixDistributionFilePath
.
'Distribution.png'
;
$distributionWelcomeImage
=
$prefixDistributionFilePath
.
'DistributionWelcome.png'
;
if
(
is_file
(
$prefixPathOnServer
.
$distributionImage
))
{
$versionObj
->
appendChild
(
new
DOMElement
(
'distributionImage'
,
$this
->
xmlentities
(
$distributionImage
)));
}
if
(
is_file
(
$prefixPathOnServer
.
$distributionWelcomeImage
))
{
$versionObj
->
appendChild
(
new
DOMElement
(
'distributionImageWelcome'
,
$this
->
xmlentities
(
$distributionWelcomeImage
)));
}
}
$versionObj
->
appendChild
(
new
DOMElement
(
...
...
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