Commit 6bfa5675 authored by Thomas Löffler's avatar Thomas Löffler

Merge branch 'develop' into 'master'

Release 07-09-17

See merge request !194
parents 34e57388 06677c29
Pipeline #2178 passed with stages
in 2 minutes and 19 seconds
......@@ -1744,16 +1744,16 @@
},
{
"name": "typo3/cms",
"version": "v8.7.5",
"version": "v8.7.6",
"source": {
"type": "git",
"url": "https://github.com/TYPO3/TYPO3.CMS.git",
"reference": "9fc9dcfbf56420555669f2bd1364191d6e6fd484"
"reference": "33058c371b1cb14638891a8d5e4235fc1af527eb"
},
"dist": {
"type": "zip",
"url": "https://api.github.com/repos/TYPO3/TYPO3.CMS/zipball/9fc9dcfbf56420555669f2bd1364191d6e6fd484",
"reference": "9fc9dcfbf56420555669f2bd1364191d6e6fd484",
"url": "https://api.github.com/repos/TYPO3/TYPO3.CMS/zipball/33058c371b1cb14638891a8d5e4235fc1af527eb",
"reference": "33058c371b1cb14638891a8d5e4235fc1af527eb",
"shasum": ""
},
"require": {
......@@ -1764,7 +1764,7 @@
"ext-pcre": "*",
"ext-session": "*",
"ext-xml": "*",
"guzzlehttp/guzzle": "^6.2.1",
"guzzlehttp/guzzle": "^6.3.0",
"mso/idna-convert": "^1.1.0",
"php": "^7.0",
"psr/http-message": "~1.0",
......@@ -1945,7 +1945,7 @@
"extbase",
"typo3"
],
"time": "2017-09-05T10:45:31+00:00"
"time": "2017-09-07T06:11:08+00:00"
},
{
"name": "typo3/cms-cli",
......
......@@ -200,13 +200,7 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController
$versionHistoryCount = (!empty($this->settings['versionHistoryCount']) ? $this->settings['versionHistoryCount'] : 5);
$skipLatestVersion = (isset($this->settings['skipLatestVersion']) ? $this->settings['skipLatestVersion'] : TRUE);
if ($extension !== NULL &&
$extension instanceof \T3o\TerFe2\Domain\Model\Extension &&
(
$this->securityRole->isReviewer() ||
($extension->getLastVersion() && $extension->getLastVersion()->getReviewState() != -1)
)
) {
if ($extension !== NULL && $extension instanceof \T3o\TerFe2\Domain\Model\Extension) {
$versionHistory = $this->versionRepository->getVersionHistory($extension, $versionHistoryCount, $skipLatestVersion);
$this->view->assign('owner', $owner);
$this->view->assign('extension', $extension);
......@@ -431,14 +425,17 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController
* @ignorevalidation $extension
* @return void
*/
public function downloadAction(\T3o\TerFe2\Domain\Model\Extension $extension, $versionString, $format)
public function downloadAction(\T3o\TerFe2\Domain\Model\Extension $extension, $versionString = '', $format = '')
{
if (!$format) {
$format = 't3x';
if ($format === '') {
$format = 'zip';
}
if ($format !== 't3x' && $format !== 'zip') {
throw new \Exception('A download action for the format "' . $format . '" is not implemented');
}
if ($versionString === '') {
$versionString = $extension->getLastVersion()->getVersionString();
}
$version = $this->versionRepository->findOneByExtensionAndVersionString($extension, $versionString);
if (!$version) {
......@@ -485,10 +482,11 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController
if (!empty($this->settings['countDownloads'])) {
$extensionKey = $extension->getExtKey();
$downloads = $this->session->get('downloads');
$versionRepository = $this->objectManager->get(\T3o\TerFe2\Domain\Repository\VersionRepository::class);
if (empty($downloads) || !in_array($extensionKey, $downloads)) {
// Add +1 to download counter and save immediately
$version->incrementDownloadCounter();
$this->persistenceManager->persistAll();
$versionRepository->update($version);
// Add extension key to session
$downloads[] = $extensionKey;
......
......@@ -441,7 +441,7 @@ class RegisterkeyController extends \T3o\TerFe2\Controller\AbstractTerBasedContr
if ($this->terConnection->deleteExtensionVersion($version->getExtension()->getExtKey(), $version->getVersionString())) {
$version->getExtension()->removeVersion($version);
$this->versionRepository->remove($version);
if ($version->getExtension()->getLastVersion() === NULL) {
if (empty($version->getExtension()->getVersions())) {
$redirectToIndexAction = TRUE;
}
$this->addFlashMessage(
......
......@@ -44,6 +44,7 @@ class ReviewController extends \T3o\TerFe2\Controller\AbstractTerBasedController
$versions = $extension->getVersions();
$versionChanged = false;
$versionRepository = $this->objectManager->get(\T3o\TerFe2\Domain\Repository\VersionRepository::class);
$extensionRepository = $this->objectManager->get(\T3o\TerFe2\Domain\Repository\ExtensionRepository::class);
foreach ($versions as $version) {
/** @var \T3o\TerFe2\Domain\Model\Version $version */
......@@ -61,6 +62,7 @@ class ReviewController extends \T3o\TerFe2\Controller\AbstractTerBasedController
$version->setReviewState($reviewState);
$versionChanged = true;
$versionRepository->update($version);
$extensionRepository->update($extension);
} else {
$message = $this->translate('msg.reviewstate_not_enabled', [$version->getVersionString(), $error]);
$this->redirectWithMessage($message, 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, 'Extension', NULL, $actionParameters);
......
......@@ -1233,10 +1233,8 @@ class Version extends \T3o\TerFe2\Domain\Model\AbstractEntity
{
// @todo: Get these versions automatically
$typo3Versions = [
'6.2 LTS' => 6002000,
'7 LTS' => 7006000,
'8 LTS' => 8007000,
'9' => 9000000
'8 LTS' => 8007000
];
$supportedTypo3Versions = [];
......
......@@ -84,14 +84,6 @@ class TerIndexer extends \ApacheSolrForTypo3\Solr\IndexQueue\Indexer {
$extension = $this->extensionRepository->findByUid($itemRecord['uid']);
if ($extension instanceof \T3o\TerFe2\Domain\Model\Extension) {
$document->setField(
'extensionIcon_stringS',
$this->getExtensionIcon(
$itemRecord['ext_key'],
$extension->getLastVersion()->getVersionString()
)
);
$typo3Dependency = $this->getDependencyVersionForPackage($extension, 'typo3');
$document->setField('extensionMinTYPO3Version_tIntS', $typo3Dependency['minimum']);
$document->setField('extensionMaxTYPO3Version_tIntS', $typo3Dependency['maximum']);
......@@ -101,36 +93,36 @@ class TerIndexer extends \ApacheSolrForTypo3\Solr\IndexQueue\Indexer {
$dependencyString .= $typo3Dependency['maximum'] > 0 ? ' - ' . VersionNumberUtility::convertIntegerToVersionNumber($typo3Dependency['maximum']) : '';
$document->setField('extensionDependency_stringS', $dependencyString ?: 'N/A');
// is last version insecure
$document->setField('insecure_boolS', $extension->getLastVersion()->getReviewState() === -1);
$document->setField('outdated_boolS', $extension->getLastVersion()->getReviewState() === -2);
// does this extension supports different versions?
// @todo: use JSON with all versions to get them
$lastVersion = $extension->getLastVersion();
$document->setField('supports6_boolS', Version::doesExtensionVersionSupportTypo3Version($lastVersion, 6002000));
$document->setField('supports7_boolS', Version::doesExtensionVersionSupportTypo3Version($lastVersion, 7006000));
$document->setField('supports8_boolS', Version::doesExtensionVersionSupportTypo3Version($lastVersion, 8007000));
$document->setField('supports9_boolS', Version::doesExtensionVersionSupportTypo3Version($lastVersion, 9000000));
$typo3Support = [];
if (Version::doesExtensionVersionSupportTypo3Version($lastVersion, 6002000)) {
$typo3Support[] = '6.2 LTS';
}
if (Version::doesExtensionVersionSupportTypo3Version($lastVersion, 7006000)) {
$typo3Support[] = '7 LTS';
}
if (Version::doesExtensionVersionSupportTypo3Version($lastVersion, 8007000)) {
$typo3Support[] = '8 LTS';
}
if (Version::doesExtensionVersionSupportTypo3Version($lastVersion, 9000000)) {
$typo3Support[] = '9';
}
$document->setField('typo3support_stringM', $typo3Support);
// add documentation link
/** @var \T3o\TerFe2\Service\Documentation $documentationService */
$documentationService = GeneralUtility::makeInstance(\T3o\TerFe2\Service\Documentation::class);
$documentationLink = $documentationService->getDocumentationLink($extension->getExtKey(), $extension->getLastVersion()->getVersionString(), true);
$documentationLink = '';
$extensionIcon = '';
if ($extension->getLastVersion() instanceof \T3o\TerFe2\Domain\Model\Version) {
$extensionIcon = $this->getExtensionIcon($itemRecord['ext_key'], $extension->getLastVersion()->getVersionString());
/** @var \T3o\TerFe2\Service\Documentation $documentationService */
$documentationService = GeneralUtility::makeInstance(\T3o\TerFe2\Service\Documentation::class);
$documentationLink = $documentationService->getDocumentationLink($extension->getExtKey(), $extension->getLastVersion()->getVersionString(), true);
}
$document->setField('extensionDocumentationLink_stringS', $documentationLink);
$document->setField('extensionIcon_stringS', $extensionIcon);
}
......
......@@ -115,6 +115,9 @@ page.includeJSFooterlibs.highcharts.external = 1
page.includeJSFooter.tx_terfe2 = EXT:ter_fe2/Resources/Public/Javascript/Default.js
page.jsInline.1 = TEXT
page.jsInline.1.value = var versionChartData = "";
# ======================================================================
# Show review form only for allowed usergroup
# ======================================================================
......
......@@ -14,7 +14,7 @@
</thead>
<tbody>
<f:for each="{versionHistory}" as="version">
<tr{f:if(condition:'{version} == {version.extension.lastVersion}',then:' class="table-success"')}{f:if(condition:'{version.reviewState} == -1',then:' class="table-danger"')}>
<tr{f:if(condition:'{version} == {version.extension.lastVersion} && {version.reviewState} != -1',then:' class="table-success"')}{f:if(condition:'{version.reviewState} == -1',then:' class="table-danger"')}>
<td class="align-middle text-center">
<f:form.checkbox name="insecureVersions[]" value="{version.uid}" checked="{version.reviewState} == -1" />
</td>
......@@ -81,7 +81,7 @@
</thead>
<tbody>
<f:for each="{versionHistory}" as="version">
<tr{f:if(condition:'{version} == {version.extension.lastVersion}',then:' class="table-success"')}{f:if(condition:'{version.reviewState} == -1',then:' class="table-danger"')}>
<tr{f:if(condition:'{version} == {version.extension.lastVersion} && {version.reviewState} != -1',then:' class="table-success"')}{f:if(condition:'{version.reviewState} == -1',then:' class="table-danger"')}>
<td class="align-middle">
<strong>{version.versionString}</strong> /
<span class="ter-ext-state-{version.state}">{version.state}</span>
......
<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:if condition="{version.matrixOfSupportedTypo3Versions}">
<h5>Works with TYPO3</h5>
<ul class="list-inline">
<f:for each="{version.matrixOfSupportedTypo3Versions}" key="label" as="supported">
<li class="list-inline-item btn btn-{f:if(condition:'{supported}',then:'success',else:'secondary')}"><strong>{label}</strong></li>
</f:for>
</ul>
<f:for each="{version.matrixOfSupportedTypo3Versions}" key="label" as="supported">
<f:if condition="{supported}">
<span class="badge badge-success"><strong>{label}</strong></span>
</f:if>
</f:for>
</f:if>
</html>
......@@ -61,7 +61,9 @@
<div class="row mb-3">
<div class="col-md-8">
<p>{extension.lastVersion.description}</p>
<f:render partial="VersionSupportForTypo3" arguments="{version: extension.lastVersion}" />
<h3>
<f:render partial="VersionSupportForTypo3" arguments="{version: extension.lastVersion}" />
</h3>
<f:if condition="{extension.tags}">
<h3>Tags</h3>
<p class="tags">
......
jQuery(document).ready(function($) {
if (versionChartData) {
if ( versionChartData !== "" ) {
Highcharts.chart( 'versionChart', {
chart: {
type: 'line'
......
......@@ -38,20 +38,25 @@
<f:format.crop maxCharacters="50">{document.author}</f:format.crop>
</small>
</f:comment>
<h5>Works with TYPO3</h5>
<ul class="list-inline">
<li class="list-inline-item btn btn-{f:if(condition:'{document.supports6_boolS}',then:'success',else:'secondary')}"><strong>6.2 LTS</strong></li>
<li class="list-inline-item btn btn-{f:if(condition:'{document.supports7_boolS}',then:'success',else:'secondary')}"><strong>7 LTS</strong></li>
<li class="list-inline-item btn btn-{f:if(condition:'{document.supports8_boolS}',then:'success',else:'secondary')}"><strong>8 LTS</strong></li>
<li class="list-inline-item btn btn-{f:if(condition:'{document.supports9_boolS}',then:'success',else:'secondary')}"><strong>9</strong></li>
</ul>
<h3>
<f:if condition="{document.supports7_boolS}">
<span class="badge badge-success"><strong>7 LTS</strong></span>
</f:if>
<f:if condition="{document.supports8_boolS}">
<span class="badge badge-success"><strong>8 LTS</strong></span>
</f:if>
</h3>
</div>
</div>
<div class="">
<a class="btn btn-primary btn-block btn-lg" href="{document.extensionDownloadZipUrl_stringS}">
<i class="fa fa-download"></i>
<strong>Download version {document.extensionVersion_stringS} as ZIP</strong>
</a>
</div>
<f:if condition="{document.insecure_boolS}">
<f:else>
<div class="">
<a class="btn btn-primary btn-block btn-lg" href="{document.extensionDownloadZipUrl_stringS}">
<i class="fa fa-download"></i>
<strong>Download version {document.extensionVersion_stringS} as ZIP</strong>
</a>
</div>
</f:else>
</f:if>
</li>
</f:section>
#!/bin/bash
# Synchronize translation packages from pootle server to local TER
# Steffen Gebert, July 2012
BASE_PATH=/home/extensions/ci/shared/html/fileadmin/ter
rsync -rc --exclude ".htaccess" --exclude ".solr/" --exclude ".tmp/" -e "ssh -i $HOME/.ssh/id_rsa-translation.typo3.org" extensionstypo3org-sync@translation.typo3.org:/var/www/translation.typo3.org/public/l10n_ter/ $BASE_PATH
find $BASE_PATH -type d -print0|/usr/bin/xargs -0 /bin/chmod 775
find $BASE_PATH -type f -print0|/usr/bin/xargs -0 /bin/chmod 664
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment