Commit 31191884 authored by Thomas Löffler's avatar Thomas Löffler
Browse files

Append Utility to all utility classes

parent 8b6590ee
Pipeline #2763 passed with stages
in 5 minutes and 8 seconds
...@@ -920,8 +920,8 @@ class tx_ter_api ...@@ -920,8 +920,8 @@ class tx_ter_api
break; break;
case 'ext_emconf.php': case 'ext_emconf.php':
$autoload = []; $autoload = [];
if (is_callable('\T3o\TerFe2\Utility\Archive::extractEmConf')) { if (is_callable(\T3o\TerFe2\Utility\ArchiveUtility::class . '::extractEmConf')) {
$emConfData = \T3o\TerFe2\Utility\Archive::extractEmConf(base64_decode($fileData->content)); $emConfData = \T3o\TerFe2\Utility\ArchiveUtility::extractEmConf(base64_decode($fileData->content));
if (!empty($emConfData['autoload'])) { if (!empty($emConfData['autoload'])) {
$autoload = $emConfData['autoload']; $autoload = $emConfData['autoload'];
} }
......
...@@ -411,13 +411,13 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController ...@@ -411,13 +411,13 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController
if ($fileUrl === '') { if ($fileUrl === '') {
$t3xFileUrl = $provider->getFileUrl($version, 't3x'); $t3xFileUrl = $provider->getFileUrl($version, 't3x');
$zipFileUrl = str_replace('.t3x', '.zip', $t3xFileUrl); $zipFileUrl = str_replace('.t3x', '.zip', $t3xFileUrl);
\T3o\TerFe2\Utility\Archive::convertT3xToZip( \T3o\TerFe2\Utility\ArchiveUtility::convertT3xToZip(
\T3o\TerFe2\Utility\File::getAbsolutePathFromUrl($t3xFileUrl), \T3o\TerFe2\Utility\FileUtility::getAbsolutePathFromUrl($t3xFileUrl),
\T3o\TerFe2\Utility\File::getAbsolutePathFromUrl($zipFileUrl) \T3o\TerFe2\Utility\FileUtility::getAbsolutePathFromUrl($zipFileUrl)
); );
// update ZIP filesize // update ZIP filesize
$version->setZipFileSize(filesize(\T3o\TerFe2\Utility\File::getAbsolutePathFromUrl($zipFileUrl))); $version->setZipFileSize(filesize(\T3o\TerFe2\Utility\FileUtility::getAbsolutePathFromUrl($zipFileUrl)));
$this->versionRepository->update($version); $this->versionRepository->update($version);
$this->persistenceManager->persistAll(); $this->persistenceManager->persistAll();
...@@ -426,13 +426,13 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController ...@@ -426,13 +426,13 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController
} }
// Check if file exists // Check if file exists
if (empty($fileUrl) || !\T3o\TerFe2\Utility\File::fileExists($fileUrl)) { if (empty($fileUrl) || !\T3o\TerFe2\Utility\FileUtility::fileExists($fileUrl)) {
$this->redirectWithMessage($this->translate('msg.file_not_found') . ': ' . basename($fileUrl), 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, null, null, array('extension' => $extension)); $this->redirectWithMessage($this->translate('msg.file_not_found') . ': ' . basename($fileUrl), 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, null, null, array('extension' => $extension));
} }
// Check file hash of t3x packages // Check file hash of t3x packages
if ($format === 't3x') { if ($format === 't3x') {
$fileHash = \T3o\TerFe2\Utility\File::getFileHash($fileUrl); $fileHash = \T3o\TerFe2\Utility\FileUtility::getFileHash($fileUrl);
if ($fileHash != $version->getFileHash()) { if ($fileHash != $version->getFileHash()) {
$this->redirectWithMessage($this->translate('msg.file_hash_not_equal'), 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, null, null, array('extension' => $extension)); $this->redirectWithMessage($this->translate('msg.file_hash_not_equal'), 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, null, null, array('extension' => $extension));
} }
...@@ -456,7 +456,7 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController ...@@ -456,7 +456,7 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController
} }
// Send file to browser // Send file to browser
if (!\T3o\TerFe2\Utility\File::transferFile($fileUrl)) { if (!\T3o\TerFe2\Utility\FileUtility::transferFile($fileUrl)) {
$this->redirectWithMessage($this->translate('msg.could_not_transfer_file'), 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, null, null, array('extension' => $extension)); $this->redirectWithMessage($this->translate('msg.could_not_transfer_file'), 'show', '', \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR, null, null, array('extension' => $extension));
} }
...@@ -506,7 +506,7 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController ...@@ -506,7 +506,7 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController
if (empty($form['comment'])) { if (empty($form['comment'])) {
$this->forwardWithError($this->translate('msg.createVersionCommentEmpty'), 'uploadVersion'); $this->forwardWithError($this->translate('msg.createVersionCommentEmpty'), 'uploadVersion');
} }
$fileInfo = \T3o\TerFe2\Utility\File::getFileInfo('tx_terfe2_pi1.form.file'); $fileInfo = \T3o\TerFe2\Utility\FileUtility::getFileInfo('tx_terfe2_pi1.form.file');
if (empty($fileInfo) || empty($fileInfo['tmp_name']) || $fileInfo['error'] != UPLOAD_ERR_OK) { if (empty($fileInfo) || empty($fileInfo['tmp_name']) || $fileInfo['error'] != UPLOAD_ERR_OK) {
$this->forwardWithError($this->translate('msg.createVersionFileEmpty'), 'uploadVersion'); $this->forwardWithError($this->translate('msg.createVersionFileEmpty'), 'uploadVersion');
} }
...@@ -515,7 +515,7 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController ...@@ -515,7 +515,7 @@ class ExtensionController extends \T3o\TerFe2\Controller\AbstractController
} }
$files = array(); $files = array();
try { try {
$extensionInfo = \T3o\TerFe2\Utility\Archive::getExtensionDetailsFromZipArchive($fileInfo['tmp_name'], $files); $extensionInfo = \T3o\TerFe2\Utility\ArchiveUtility::getExtensionDetailsFromZipArchive($fileInfo['tmp_name'], $files);
} catch (\Exception $exception) { } catch (\Exception $exception) {
$this->forwardWithError($exception->getMessage(), 'uploadVersion'); $this->forwardWithError($exception->getMessage(), 'uploadVersion');
} }
......
...@@ -15,7 +15,7 @@ namespace T3o\TerFe2\Domain\Model; ...@@ -15,7 +15,7 @@ namespace T3o\TerFe2\Domain\Model;
* The TYPO3 project - inspiring people to share! * The TYPO3 project - inspiring people to share!
*/ */
use T3o\TerFe2\Utility\Version as VersionUtility; use T3o\TerFe2\Utility\VersionUtility;
/** /**
* Any type of relation of an extension * Any type of relation of an extension
......
...@@ -1168,7 +1168,7 @@ class Version extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity ...@@ -1168,7 +1168,7 @@ class Version extends \TYPO3\CMS\Extbase\DomainObject\AbstractEntity
$supportedTypo3Versions = []; $supportedTypo3Versions = [];
foreach ($typo3Versions as $label => $mainVersion) { foreach ($typo3Versions as $label => $mainVersion) {
$supportedTypo3Versions[$label] = \T3o\TerFe2\Utility\Version::doesExtensionVersionSupportTypo3Version($this, $mainVersion); $supportedTypo3Versions[$label] = \T3o\TerFe2\Utility\VersionUtility::doesExtensionVersionSupportTypo3Version($this, $mainVersion);
} }
return $supportedTypo3Versions; return $supportedTypo3Versions;
......
...@@ -51,7 +51,7 @@ abstract class AbstractProvider implements \T3o\TerFe2\Provider\ProviderInterfac ...@@ -51,7 +51,7 @@ abstract class AbstractProvider implements \T3o\TerFe2\Provider\ProviderInterfac
*/ */
public function __construct() public function __construct()
{ {
$this->imageCachePath = \T3o\TerFe2\Utility\File::getAbsoluteDirectory($this->imageCachePath); $this->imageCachePath = \T3o\TerFe2\Utility\FileUtility::getAbsoluteDirectory($this->imageCachePath);
} }
...@@ -110,8 +110,8 @@ abstract class AbstractProvider implements \T3o\TerFe2\Provider\ProviderInterfac ...@@ -110,8 +110,8 @@ abstract class AbstractProvider implements \T3o\TerFe2\Provider\ProviderInterfac
$localName = $this->imageCachePath . basename($filename); $localName = $this->imageCachePath . basename($filename);
// Check local cache first // Check local cache first
if (\T3o\TerFe2\Utility\File::fileExists($localName)) { if (\T3o\TerFe2\Utility\FileUtility::fileExists($localName)) {
return \T3o\TerFe2\Utility\File::getUrlFromAbsolutePath($localName); return \T3o\TerFe2\Utility\FileUtility::getUrlFromAbsolutePath($localName);
} }
// Get icon from concrete extension provider // Get icon from concrete extension provider
...@@ -119,10 +119,10 @@ abstract class AbstractProvider implements \T3o\TerFe2\Provider\ProviderInterfac ...@@ -119,10 +119,10 @@ abstract class AbstractProvider implements \T3o\TerFe2\Provider\ProviderInterfac
// Copy icon to local cache // Copy icon to local cache
if (!empty($iconUrl)) { if (!empty($iconUrl)) {
\T3o\TerFe2\Utility\File::copyFile($iconUrl, $localName); \T3o\TerFe2\Utility\FileUtility::copyFile($iconUrl, $localName);
} }
return \T3o\TerFe2\Utility\File::getUrlFromAbsolutePath($localName); return \T3o\TerFe2\Utility\FileUtility::getUrlFromAbsolutePath($localName);
} }
......
...@@ -14,7 +14,7 @@ namespace T3o\TerFe2\Provider; ...@@ -14,7 +14,7 @@ namespace T3o\TerFe2\Provider;
* The TYPO3 project - inspiring people to share! * The TYPO3 project - inspiring people to share!
*/ */
use T3o\TerFe2\Utility\Category; use T3o\TerFe2\Utility\CategoryUtility;
/** /**
* Extension provider using local files * Extension provider using local files
...@@ -44,7 +44,7 @@ class FileProvider extends \T3o\TerFe2\Provider\AbstractProvider ...@@ -44,7 +44,7 @@ class FileProvider extends \T3o\TerFe2\Provider\AbstractProvider
if (!empty($this->configuration['extensionRootPath'])) { if (!empty($this->configuration['extensionRootPath'])) {
$this->extensionRootPath = $this->configuration['extensionRootPath']; $this->extensionRootPath = $this->configuration['extensionRootPath'];
} }
$this->extensionRootPath = \T3o\TerFe2\Utility\File::getAbsoluteDirectory($this->extensionRootPath); $this->extensionRootPath = \T3o\TerFe2\Utility\FileUtility::getAbsoluteDirectory($this->extensionRootPath);
// Get repository for extension manager cache entries // Get repository for extension manager cache entries
$this->extensionManagerRepository = $this->objectManager->get(\T3o\TerFe2\Domain\Repository\ExtensionManagerCacheEntryRepository::class); $this->extensionManagerRepository = $this->objectManager->get(\T3o\TerFe2\Domain\Repository\ExtensionManagerCacheEntryRepository::class);
...@@ -98,17 +98,17 @@ class FileProvider extends \T3o\TerFe2\Provider\AbstractProvider ...@@ -98,17 +98,17 @@ class FileProvider extends \T3o\TerFe2\Provider\AbstractProvider
$filename = $this->extensionRootPath . $filename; $filename = $this->extensionRootPath . $filename;
// Check if file exists // Check if file exists
if (!\T3o\TerFe2\Utility\File::fileExists($filename)) { if (!\T3o\TerFe2\Utility\FileUtility::fileExists($filename)) {
if ($fileType === 't3x' || $fileType === 'zip') { if ($fileType === 't3x' || $fileType === 'zip') {
//throw new \Exception('File "' . $filename . '" not found'); //throw new \Exception('File "' . $filename . '" not found');
} }
\T3o\TerFe2\Utility\Log::addMessage('File "' . $filename . '" not found', 'ter_fe2', 2); \T3o\TerFe2\Utility\LogUtility::addMessage('File "' . $filename . '" not found', 'ter_fe2', 2);
return ''; return '';
} }
// Get local url from absolute path // Get local url from absolute path
return \T3o\TerFe2\Utility\File::getUrlFromAbsolutePath($filename); return \T3o\TerFe2\Utility\FileUtility::getUrlFromAbsolutePath($filename);
} }
...@@ -187,18 +187,18 @@ class FileProvider extends \T3o\TerFe2\Provider\AbstractProvider ...@@ -187,18 +187,18 @@ class FileProvider extends \T3o\TerFe2\Provider\AbstractProvider
$content = \TYPO3\CMS\Core\Utility\GeneralUtility::getURL($filename); $content = \TYPO3\CMS\Core\Utility\GeneralUtility::getURL($filename);
$filesize = strlen($content); $filesize = strlen($content);
if (empty($content)) { if (empty($content)) {
\T3o\TerFe2\Utility\Log::addMessage('File "' . $filename . '" could not be fetched', 'ter_fe2', 2); \T3o\TerFe2\Utility\LogUtility::addMessage('File "' . $filename . '" could not be fetched', 'ter_fe2', 2);
return array(); return array();
} }
// Check file hash // Check file hash
if ($fileHash !== md5($content)) { if ($fileHash !== md5($content)) {
\T3o\TerFe2\Utility\Log::addMessage('File hash missmatch of file "' . $filename . '"', 'ter_fe2', 2); \T3o\TerFe2\Utility\LogUtility::addMessage('File hash missmatch of file "' . $filename . '"', 'ter_fe2', 2);
return array(); return array();
} }
// Get EM_CONF array // Get EM_CONF array
$extension = \T3o\TerFe2\Utility\Archive::decompressT3xStream($content); $extension = \T3o\TerFe2\Utility\ArchiveUtility::decompressT3xStream($content);
$emConf = array(); $emConf = array();
if (!empty($extension['EM_CONF'])) { if (!empty($extension['EM_CONF'])) {
$emConf = $extension['EM_CONF']; $emConf = $extension['EM_CONF'];
...@@ -242,7 +242,7 @@ class FileProvider extends \T3o\TerFe2\Provider\AbstractProvider ...@@ -242,7 +242,7 @@ class FileProvider extends \T3o\TerFe2\Provider\AbstractProvider
$extensionModel = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class); $extensionModel = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Extensionmanager\Domain\Model\Extension::class);
$states = $extensionModel->getDefaultState(null); $states = $extensionModel->getDefaultState(null);
$states = array_flip($states); $states = array_flip($states);
$categories = Category::getDefaultCategories(); $categories = CategoryUtility::getDefaultCategories();
$categories = array_flip($categories); $categories = array_flip($categories);
$extensions = array(); $extensions = array();
......
...@@ -44,7 +44,7 @@ class MirrorProvider extends \T3o\TerFe2\Provider\FileProvider ...@@ -44,7 +44,7 @@ class MirrorProvider extends \T3o\TerFe2\Provider\FileProvider
if (!empty($this->configuration['fileCachePath'])) { if (!empty($this->configuration['fileCachePath'])) {
$this->fileCachePath = $this->configuration['fileCachePath']; $this->fileCachePath = $this->configuration['fileCachePath'];
} }
$this->fileCachePath = \T3o\TerFe2\Utility\File::getAbsoluteDirectory($this->fileCachePath); $this->fileCachePath = \T3o\TerFe2\Utility\FileUtility::getAbsoluteDirectory($this->fileCachePath);
// Get repository id // Get repository id
$repositoryId = 1; $repositoryId = 1;
...@@ -76,25 +76,25 @@ class MirrorProvider extends \T3o\TerFe2\Provider\FileProvider ...@@ -76,25 +76,25 @@ class MirrorProvider extends \T3o\TerFe2\Provider\FileProvider
} }
// Check local cache first // Check local cache first
if (!empty($localName) && $fileType === 't3x' && \T3o\TerFe2\Utility\File::fileExists($localName)) { if (!empty($localName) && $fileType === 't3x' && \T3o\TerFe2\Utility\FileUtility::fileExists($localName)) {
return \T3o\TerFe2\Utility\File::getUrlFromAbsolutePath($localName); return \T3o\TerFe2\Utility\FileUtility::getUrlFromAbsolutePath($localName);
} }
// Get filename on mirror server // Get filename on mirror server
$filename = $this->mirrorService->getUrlToFile($filename); $filename = $this->mirrorService->getUrlToFile($filename);
if (\T3o\TerFe2\Utility\File::isLocalUrl($filename)) { if (\T3o\TerFe2\Utility\FileUtility::isLocalUrl($filename)) {
$filename = \T3o\TerFe2\Utility\File::getAbsolutePathFromUrl($filename); $filename = \T3o\TerFe2\Utility\FileUtility::getAbsolutePathFromUrl($filename);
} }
// Copy file to local cache and return it // Copy file to local cache and return it
if (!empty($localName)) { if (!empty($localName)) {
\T3o\TerFe2\Utility\File::copyFile($filename, $localName); \T3o\TerFe2\Utility\FileUtility::copyFile($filename, $localName);
return \T3o\TerFe2\Utility\File::getUrlFromAbsolutePath($localName); return \T3o\TerFe2\Utility\FileUtility::getUrlFromAbsolutePath($localName);
} }
// Get local url from absolute path // Get local url from absolute path
if (\T3o\TerFe2\Utility\File::isAbsolutePath($filename)) { if (\T3o\TerFe2\Utility\FileUtility::isAbsolutePath($filename)) {
return \T3o\TerFe2\Utility\File::getUrlFromAbsolutePath($filename); return \T3o\TerFe2\Utility\FileUtility::getUrlFromAbsolutePath($filename);
} }
return $filename; return $filename;
...@@ -123,7 +123,7 @@ class MirrorProvider extends \T3o\TerFe2\Provider\FileProvider ...@@ -123,7 +123,7 @@ class MirrorProvider extends \T3o\TerFe2\Provider\FileProvider
// Check file hash // Check file hash
if ($fileHash !== md5($content)) { if ($fileHash !== md5($content)) {
\T3o\TerFe2\Utility\Log::addMessage('File hash missmatch of file "' . $filename . '"', 'ter_fe2', 2); \T3o\TerFe2\Utility\LogUtility::addMessage('File hash missmatch of file "' . $filename . '"', 'ter_fe2', 2);
return array(); return array();
} }
...@@ -134,7 +134,7 @@ class MirrorProvider extends \T3o\TerFe2\Provider\FileProvider ...@@ -134,7 +134,7 @@ class MirrorProvider extends \T3o\TerFe2\Provider\FileProvider
} }
// Get EM_CONF array // Get EM_CONF array
$extension = \T3o\TerFe2\Utility\Archive::decompressT3xStream($content); $extension = \T3o\TerFe2\Utility\ArchiveUtility::decompressT3xStream($content);
$emConf = array(); $emConf = array();
if (!empty($extension['EM_CONF'])) { if (!empty($extension['EM_CONF'])) {
$emConf = $extension['EM_CONF']; $emConf = $extension['EM_CONF'];
......
...@@ -187,7 +187,7 @@ class Mirror implements \TYPO3\CMS\Core\SingletonInterface ...@@ -187,7 +187,7 @@ class Mirror implements \TYPO3\CMS\Core\SingletonInterface
// Check mirrors if file exits // Check mirrors if file exits
$attempts = 1; $attempts = 1;
$maxAttempts = $this->getMaxAttempts(); $maxAttempts = $this->getMaxAttempts();
while (!\T3o\TerFe2\Utility\File::fileExists($mirrorUrl . $filename)) { while (!\T3o\TerFe2\Utility\FileUtility::fileExists($mirrorUrl . $filename)) {
$attempts++; $attempts++;
if ($attempts > $maxAttempts) { if ($attempts > $maxAttempts) {
// throw new \Exception('File "' . $filename . '" could not be found on ' . $maxAttempts . ' mirrors, break'); // throw new \Exception('File "' . $filename . '" could not be found on ' . $maxAttempts . ' mirrors, break');
...@@ -212,8 +212,8 @@ class Mirror implements \TYPO3\CMS\Core\SingletonInterface ...@@ -212,8 +212,8 @@ class Mirror implements \TYPO3\CMS\Core\SingletonInterface
{ {
$url = $this->getUrlToFile($filename); $url = $this->getUrlToFile($filename);
if (\T3o\TerFe2\Utility\File::isLocalUrl($url)) { if (\T3o\TerFe2\Utility\FileUtility::isLocalUrl($url)) {
$url = \T3o\TerFe2\Utility\File::getAbsolutePathFromUrl($url); $url = \T3o\TerFe2\Utility\FileUtility::getAbsolutePathFromUrl($url);
$content = \TYPO3\CMS\Core\Utility\GeneralUtility::getURL($url); $content = \TYPO3\CMS\Core\Utility\GeneralUtility::getURL($url);
} else { } else {
$content = \TYPO3\CMS\Core\Utility\GeneralUtility::getURL($url, 0, array(TYPO3_user_agent)); $content = \TYPO3\CMS\Core\Utility\GeneralUtility::getURL($url, 0, array(TYPO3_user_agent));
......
...@@ -17,7 +17,7 @@ namespace T3o\TerFe2\Solr\IndexQueue; ...@@ -17,7 +17,7 @@ namespace T3o\TerFe2\Solr\IndexQueue;
use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\GeneralUtility;
use ApacheSolrForTypo3\Solr\IndexQueue\Item; use ApacheSolrForTypo3\Solr\IndexQueue\Item;
use TYPO3\CMS\Core\Utility\VersionNumberUtility; use TYPO3\CMS\Core\Utility\VersionNumberUtility;
use T3o\TerFe2\Utility\Version; use T3o\TerFe2\Utility\VersionUtility;
/** /**
* Class \T3o\TerFe2\Solr\IndexQueue\TerIndexer * Class \T3o\TerFe2\Solr\IndexQueue\TerIndexer
...@@ -104,13 +104,13 @@ class TerIndexer extends \ApacheSolrForTypo3\Solr\IndexQueue\Indexer ...@@ -104,13 +104,13 @@ class TerIndexer extends \ApacheSolrForTypo3\Solr\IndexQueue\Indexer
// does this extension supports different versions? // does this extension supports different versions?
// @todo: use JSON with all versions to get them // @todo: use JSON with all versions to get them
$lastVersion = $extension->getLastVersion(); $lastVersion = $extension->getLastVersion();
$document->setField('supports7_boolS', Version::doesExtensionVersionSupportTypo3Version($lastVersion, 7006000)); $document->setField('supports7_boolS', VersionUtility::doesExtensionVersionSupportTypo3Version($lastVersion, 7006000));
$document->setField('supports8_boolS', Version::doesExtensionVersionSupportTypo3Version($lastVersion, 8007000)); $document->setField('supports8_boolS', VersionUtility::doesExtensionVersionSupportTypo3Version($lastVersion, 8007000));
$typo3Support = []; $typo3Support = [];
if (Version::doesExtensionVersionSupportTypo3Version($lastVersion, 7006000)) { if (VersionUtility::doesExtensionVersionSupportTypo3Version($lastVersion, 7006000)) {
$typo3Support[] = '7 LTS'; $typo3Support[] = '7 LTS';
} }
if (Version::doesExtensionVersionSupportTypo3Version($lastVersion, 8007000)) { if (VersionUtility::doesExtensionVersionSupportTypo3Version($lastVersion, 8007000)) {
$typo3Support[] = '8 LTS'; $typo3Support[] = '8 LTS';
} }
$document->setField('typo3support_stringM', $typo3Support); $document->setField('typo3support_stringM', $typo3Support);
...@@ -188,7 +188,7 @@ class TerIndexer extends \ApacheSolrForTypo3\Solr\IndexQueue\Indexer ...@@ -188,7 +188,7 @@ class TerIndexer extends \ApacheSolrForTypo3\Solr\IndexQueue\Indexer
$fileType $fileType
); );
if (file_exists(PATH_site . $iconPath . $iconFile)) { if (file_exists(PATH_site . $iconPath . $iconFile)) {
$icon = \T3o\TerFe2\Utility\File::getRelativeUrlFromAbsolutePath($iconPath . $iconFile); $icon = \T3o\TerFe2\Utility\FileUtility::getRelativeUrlFromAbsolutePath($iconPath . $iconFile);
break; break;
} }
} }
......
<?php <?php
namespace T3o\TerFe2\Task; namespace T3o\TerFe2\Task;
use T3o\TerFe2\Utility\Category; use T3o\TerFe2\Utility\CategoryUtility;
/* /*
* This file is part of the TYPO3 CMS project. * This file is part of the TYPO3 CMS project.
......
...@@ -219,7 +219,7 @@ class ImportExtensionsFromQueueTask extends Task ...@@ -219,7 +219,7 @@ class ImportExtensionsFromQueueTask extends Task
{ {
$extensionModel = GeneralUtility::makeInstance(Extension::class); $extensionModel = GeneralUtility::makeInstance(Extension::class);
$states = $extensionModel->getDefaultState(null); $states = $extensionModel->getDefaultState(null);
$categories = \T3o\TerFe2\Utility\Category::getDefaultCategories(); $categories = \T3o\TerFe2\Utility\CategoryUtility::getDefaultCategories();
$folder1 = substr($extData['extensionkey'], 0, 1); $folder1 = substr($extData['extensionkey'], 0, 1);
$folder2 = substr($extData['extensionkey'], 1, 1); $folder2 = substr($extData['extensionkey'], 1, 1);
......
...@@ -20,7 +20,7 @@ use PhpParser\ParserFactory; ...@@ -20,7 +20,7 @@ use PhpParser\ParserFactory;
/** /**
* Utilities to manage zip and t3x files * Utilities to manage zip and t3x files
*/ */
class Archive class ArchiveUtility
{ {
/** /**
...@@ -39,7 +39,7 @@ class Archive ...@@ -39,7 +39,7 @@ class Archive
} }
// Check if file already exists // Check if file already exists
if (!$overwrite && \T3o\TerFe2\Utility\File::fileExists($filename)) { if (!$overwrite && \T3o\TerFe2\Utility\FileUtility::fileExists($filename)) {
return true; return true;
} }
...@@ -85,12 +85,12 @@ class Archive ...@@ -85,12 +85,12 @@ class Archive
} }
// Check if file exists // Check if file exists
if (!\T3o\TerFe2\Utility\File::fileExists($filename)) { if (!\T3o\TerFe2\Utility\FileUtility::fileExists($filename)) {
throw new \Exception('File "' . $filename . '" not found to extract'); throw new \Exception('File "' . $filename . '" not found to extract');
} }
// Check if path is writable // Check if path is writable
$path = \T3o\TerFe2\Utility\File::getAbsoluteDirectory($path); $path = \T3o\TerFe2\Utility\FileUtility::getAbsoluteDirectory($path);
if (!is_writable($path)) { if (!is_writable($path)) {
throw new \Exception('Path "' . $path . '" is not writeable'); throw new \Exception('Path "' . $path . '" is not writeable');
} }
...@@ -129,7 +129,7 @@ class Archive ...@@ -129,7 +129,7 @@ class Archive
} }
// Check if file exists // Check if file exists
if (!\T3o\TerFe2\Utility\File::fileExists($filename)) { if (!\T3o\TerFe2\Utility\FileUtility::fileExists($filename)) {
throw new \Exception('File "' . $filename . '" not found to extract'); throw new \Exception('File "' . $filename . '" not found to extract');
} }
...@@ -184,7 +184,7 @@ class Archive ...@@ -184,7 +184,7 @@ class Archive
} }
// Check if file was cached // Check if file was cached
if (\T3o\TerFe2\Utility\File::fileExists($zipFile)) { if (\T3o\TerFe2\Utility\FileUtility::fileExists($zipFile)) {
return true; return true;
} }
...@@ -199,7 +199,7 @@ class Archive ...@@ -199,7 +199,7 @@ class Archive
// Create ext_emconf.php if it doesn't exist // Create ext_emconf.php if it doesn't exist
if (!isset($files['ext_emconf.php']) && !empty($content['extKey']) && !empty($content['EM_CONF']) && is_array($content['EM_CONF'])) {