Commit b1880fd2 authored by Thomas Löffler's avatar Thomas Löffler

Change some first stuff extension scanner is complaining

parent a07175e2
Pipeline #7445 passed with stages
in 2 minutes and 49 seconds
...@@ -36,7 +36,7 @@ class ExtConf implements SingletonInterface ...@@ -36,7 +36,7 @@ class ExtConf implements SingletonInterface
public function __construct() public function __construct()
{ {
// get global configuration // get global configuration
$extConf = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ter']); $extConf = $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['ter'];
if (is_array($extConf) && count($extConf)) { if (is_array($extConf) && count($extConf)) {
// call setter method foreach configuration entry // call setter method foreach configuration entry
foreach ($extConf as $key => $value) { foreach ($extConf as $key => $value) {
......
...@@ -14,6 +14,7 @@ namespace T3o\Ter\Task; ...@@ -14,6 +14,7 @@ namespace T3o\Ter\Task;
* The TYPO3 project - inspiring people to share! * The TYPO3 project - inspiring people to share!
*/ */
use TYPO3\CMS\Core\Core\Environment;
use TYPO3\CMS\Core\Utility\GeneralUtility; use TYPO3\CMS\Core\Utility\GeneralUtility;
/** /**
...@@ -42,7 +43,7 @@ class UpdateCurrentVersionListTask extends \TYPO3\CMS\Extbase\Scheduler\Task ...@@ -42,7 +43,7 @@ class UpdateCurrentVersionListTask extends \TYPO3\CMS\Extbase\Scheduler\Task
protected function fetchCurrentCoreData() protected function fetchCurrentCoreData()
{ {
$result = false; $result = false;
$targetFile = PATH_site . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'] . 'currentcoredata.json'; $targetFile = Environment::getPublicPath() . '/' . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'] . 'currentcoredata.json';
$sourceData = GeneralUtility::getUrl('http://get.typo3.org/json'); $sourceData = GeneralUtility::getUrl('http://get.typo3.org/json');
if (json_decode($sourceData, true) !== null) { if (json_decode($sourceData, true) !== null) {
$result = GeneralUtility::writeFile($targetFile, $sourceData); $result = GeneralUtility::writeFile($targetFile, $sourceData);
...@@ -57,7 +58,7 @@ class UpdateCurrentVersionListTask extends \TYPO3\CMS\Extbase\Scheduler\Task ...@@ -57,7 +58,7 @@ class UpdateCurrentVersionListTask extends \TYPO3\CMS\Extbase\Scheduler\Task
protected function fetchCurrentDocumentationData() protected function fetchCurrentDocumentationData()
{ {
$result = false; $result = false;
$targetFile = PATH_site . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'] . 'currentdocumentationdata.json'; $targetFile = Environment::getPublicPath() . '/' . $GLOBALS['TYPO3_CONF_VARS']['BE']['fileadminDir'] . 'currentdocumentationdata.json';
$sourceData = GeneralUtility::getUrl('https://intercept.typo3.com/assets/docs/manuals.json'); $sourceData = GeneralUtility::getUrl('https://intercept.typo3.com/assets/docs/manuals.json');
if (json_decode($sourceData, true) !== null) { if (json_decode($sourceData, true) !== null) {
$result = GeneralUtility::writeFile($targetFile, $sourceData); $result = GeneralUtility::writeFile($targetFile, $sourceData);
...@@ -76,12 +77,12 @@ class UpdateCurrentVersionListTask extends \TYPO3\CMS\Extbase\Scheduler\Task ...@@ -76,12 +77,12 @@ class UpdateCurrentVersionListTask extends \TYPO3\CMS\Extbase\Scheduler\Task
protected function generateExtensionFilesForExtensionManager(): bool protected function generateExtensionFilesForExtensionManager(): bool
{ {
// Check extension configuration // Check extension configuration
if (empty($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ter'])) { if (empty($GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['ter'])) {
throw new \Exception('No extension configuration found in $TYPO3_CONF_VARS', 1303220916); throw new \Exception('No extension configuration found in $TYPO3_CONF_VARS', 1303220916);
} }
// Check extension repository path // Check extension repository path
$extensionConfig = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ter']); $extensionConfig = $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['ter'];
if (empty($extensionConfig['repositoryDir'])) { if (empty($extensionConfig['repositoryDir'])) {
throw new \Exception('No repository path found in extension configuration', 1303220917); throw new \Exception('No repository path found in extension configuration', 1303220917);
} }
......
...@@ -19,7 +19,7 @@ return [ ...@@ -19,7 +19,7 @@ return [
'label_userFunc' => 'EXT:ter/class.tx_ter_tcaLabel.php:tx_ter_tcaLabel->getExtensionKey', 'label_userFunc' => 'EXT:ter/class.tx_ter_tcaLabel.php:tx_ter_tcaLabel->getExtensionKey',
'default_sortby' => 'ORDER BY extensionuid', 'default_sortby' => 'ORDER BY extensionuid',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails', 'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensiondetails',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extensionKey) . 'tx_ter_extensiondetails.gif', 'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensiondetails.gif',
'dividers2tabs' => true, 'dividers2tabs' => true,
], ],
'interface' => [ 'interface' => [
......
...@@ -20,7 +20,7 @@ return [ ...@@ -20,7 +20,7 @@ return [
'tstamp' => 'tstamp', 'tstamp' => 'tstamp',
'crdate' => 'crdate', 'crdate' => 'crdate',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionkeys', 'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionkeys',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extensionKey) . 'tx_ter_extensionkeys.gif', 'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensionkeys.gif',
'dividers2tabs' => true, 'dividers2tabs' => true,
], ],
'interface' => [ 'interface' => [
......
...@@ -18,7 +18,7 @@ return [ ...@@ -18,7 +18,7 @@ return [
'label' => 'extensionkey', 'label' => 'extensionkey',
'default_sortby' => 'ORDER BY extensionkey', 'default_sortby' => 'ORDER BY extensionkey',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionmembers', 'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionmembers',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extensionKey) . 'tx_ter_extensionmembers.gif', 'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensionmembers.gif',
'dividers2tabs' => true, 'dividers2tabs' => true,
], ],
'interface' => [ 'interface' => [
......
...@@ -21,7 +21,7 @@ return [ ...@@ -21,7 +21,7 @@ return [
'tstamp' => 'tstamp', 'tstamp' => 'tstamp',
'delete' => 'deleted', 'delete' => 'deleted',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionqueue', 'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensionqueue',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extensionKey) . 'tx_ter_extensionqueue.gif', 'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensionqueue.gif',
'dividers2tabs' => true, 'dividers2tabs' => true,
], ],
'interface' => [ 'interface' => [
......
...@@ -20,7 +20,7 @@ return [ ...@@ -20,7 +20,7 @@ return [
'tstamp' => 'tstamp', 'tstamp' => 'tstamp',
'crdate' => 'crdate', 'crdate' => 'crdate',
'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions', 'title' => 'LLL:EXT:ter/locallang_tca.xml:tx_ter_extensions',
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath($extensionKey) . 'tx_ter_extensions.gif', 'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(ExtensionManagementUtility::extPath($extensionKey)) . 'tx_ter_extensions.gif',
'dividers2tabs' => true, 'dividers2tabs' => true,
], ],
'interface' => [ 'interface' => [
......
...@@ -33,11 +33,14 @@ class tx_ter_tcaLabel ...@@ -33,11 +33,14 @@ class tx_ter_tcaLabel
return; return;
} }
$result = $GLOBALS['TYPO3_DB']->exec_SELECTgetSingleRow( $result = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance(\TYPO3\CMS\Core\Database\ConnectionPool::class)
'extensionkey', ->getConnectionForTable('tx_ter_extensions')
'tx_ter_extensions', ->select(
'uid=' . (int)$params['row']['uid'] ['extensionkey'],
); 'tx_ter_extensions',
['uid = ' . (int)$params['row']['uid']]
)
->fetch();
if (!empty($result['extensionkey'])) { if (!empty($result['extensionkey'])) {
$params['title'] = htmlspecialchars($result['extensionkey']); $params['title'] = htmlspecialchars($result['extensionkey']);
......
...@@ -30,11 +30,8 @@ ...@@ -30,11 +30,8 @@
* TOTAL FUNCTIONS: 1 * TOTAL FUNCTIONS: 1
* (This index is automatically created/updated by the extension "extdeveval") * (This index is automatically created/updated by the extension "extdeveval")
*/ */
use TYPO3\CMS\Core\Utility\ExtensionManagementUtility;
use TYPO3\CMS\Frontend\Plugin\AbstractPlugin; use TYPO3\CMS\Frontend\Plugin\AbstractPlugin;
require_once(ExtensionManagementUtility::extPath('ter') . 'class.tx_ter_api.php');
/** /**
* TYPO3 Extension Repository, frontend plugin for SOAP service * TYPO3 Extension Repository, frontend plugin for SOAP service
* *
...@@ -50,14 +47,12 @@ class tx_ter_pi1 extends AbstractPlugin ...@@ -50,14 +47,12 @@ class tx_ter_pi1 extends AbstractPlugin
public function main($content, $conf) public function main($content, $conf)
{ {
global $TSFE;
$this->pi_initPIflexForm(); $this->pi_initPIflexForm();
$this->conf = $conf; $this->conf = $conf;
$this->extensionsPID = $conf['pid']; $this->extensionsPID = $conf['pid'];
$this->wsdlNamespace = $conf['wsdlNamespace']; $this->wsdlNamespace = $conf['wsdlNamespace'];
$staticConfArr = unserialize($GLOBALS['TYPO3_CONF_VARS']['EXT']['extConf']['ter']); $staticConfArr = $GLOBALS['TYPO3_CONF_VARS']['EXTENSIONS']['ter'];
if (is_array($staticConfArr)) { if (is_array($staticConfArr)) {
$this->repositoryDir = $staticConfArr['repositoryDir']; $this->repositoryDir = $staticConfArr['repositoryDir'];
if (substr($this->repositoryDir, -1, 1) != '/') { if (substr($this->repositoryDir, -1, 1) != '/') {
......
...@@ -31,9 +31,8 @@ define('PATH_thisScript', str_replace('//', '/', str_replace( ...@@ -31,9 +31,8 @@ define('PATH_thisScript', str_replace('//', '/', str_replace(
(php_sapi_name() == 'cgi' || php_sapi_name() == 'isapi' || php_sapi_name() == 'cgi-fcgi') && ($_SERVER['ORIG_PATH_TRANSLATED'] ? $_SERVER['ORIG_PATH_TRANSLATED'] : $_SERVER['PATH_TRANSLATED']) ? ($_SERVER['ORIG_PATH_TRANSLATED'] ? $_SERVER['ORIG_PATH_TRANSLATED'] : $_SERVER['PATH_TRANSLATED']) : ($_SERVER['ORIG_SCRIPT_FILENAME'] ? $_SERVER['ORIG_SCRIPT_FILENAME'] : $_SERVER['SCRIPT_FILENAME']) (php_sapi_name() == 'cgi' || php_sapi_name() == 'isapi' || php_sapi_name() == 'cgi-fcgi') && ($_SERVER['ORIG_PATH_TRANSLATED'] ? $_SERVER['ORIG_PATH_TRANSLATED'] : $_SERVER['PATH_TRANSLATED']) ? ($_SERVER['ORIG_PATH_TRANSLATED'] ? $_SERVER['ORIG_PATH_TRANSLATED'] : $_SERVER['PATH_TRANSLATED']) : ($_SERVER['ORIG_SCRIPT_FILENAME'] ? $_SERVER['ORIG_SCRIPT_FILENAME'] : $_SERVER['SCRIPT_FILENAME'])
))); )));
define('PATH_site', str_replace(['/wsdl', '/typo3conf/ext/ter'], '', dirname(PATH_thisScript)) . '/'); define('PATH_site', str_replace(['/wsdl', '/typo3conf/ext/ter'], '', dirname(\TYPO3\CMS\Core\Core\Environment::getCurrentScript())) . '/');
define('PATH_typo3', PATH_site . 'typo3/'); define('PATH_typo3', PATH_site . 'typo3/');
define('PATH_tslib', PATH_typo3 . 'sysext/cms/tslib/');
define('PATH_typo3conf', PATH_site . 'typo3conf/'); define('PATH_typo3conf', PATH_site . 'typo3conf/');
define('TYPO3_mainDir', 'typo3/'); define('TYPO3_mainDir', 'typo3/');
......
...@@ -16,7 +16,7 @@ return [ ...@@ -16,7 +16,7 @@ return [
'enablecolumns' => [ 'enablecolumns' => [
'disabled' => 'hidden' 'disabled' => 'hidden'
], ],
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath('ter_fe2') . 'Resources/Public/Icons/author.gif', 'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ter_fe2')) . 'Resources/Public/Icons/author.gif',
], ],
'interface' => [ 'interface' => [
'showRecordFieldList' => 'name,email,company,forge_link,username,versions,frontend_user,author_type', 'showRecordFieldList' => 'name,email,company,forge_link,username,versions,frontend_user,author_type',
......
...@@ -16,7 +16,7 @@ return [ ...@@ -16,7 +16,7 @@ return [
'enablecolumns' => [ 'enablecolumns' => [
'disabled' => 'hidden' 'disabled' => 'hidden'
], ],
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath('ter_fe2') . 'Resources/Public/Icons/extension.gif', 'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ter_fe2')) . 'Resources/Public/Icons/extension.gif',
], ],
'interface' => [ 'interface' => [
'showRecordFieldList' => 'ext_key,forge_link,last_update,last_maintained,tags,versions,last_version,frontend_user,downloads,composer_name,repository_url,paypal_url,external_manual,expire', 'showRecordFieldList' => 'ext_key,forge_link,last_update,last_maintained,tags,versions,last_version,frontend_user,downloads,composer_name,repository_url,paypal_url,external_manual,expire',
......
...@@ -16,7 +16,7 @@ return [ ...@@ -16,7 +16,7 @@ return [
'enablecolumns' => [ 'enablecolumns' => [
'disabled' => 'hidden' 'disabled' => 'hidden'
], ],
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath('ter_fe2') . 'Resources/Public/Icons/relation.gif', 'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ter_fe2')) . 'Resources/Public/Icons/relation.gif',
], ],
'interface' => [ 'interface' => [
'showRecordFieldList' => 'relation_type,relation_key,minimum_version,maximum_version', 'showRecordFieldList' => 'relation_type,relation_key,minimum_version,maximum_version',
......
...@@ -16,7 +16,7 @@ return [ ...@@ -16,7 +16,7 @@ return [
'enablecolumns' => [ 'enablecolumns' => [
'disabled' => 'hidden' 'disabled' => 'hidden'
], ],
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath('ter_fe2') . 'Resources/Public/Icons/tag.gif', 'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ter_fe2')) . 'Resources/Public/Icons/tag.gif',
], ],
'interface' => [ 'interface' => [
'showRecordFieldList' => 'title,extensions', 'showRecordFieldList' => 'title,extensions',
......
...@@ -18,7 +18,7 @@ return [ ...@@ -18,7 +18,7 @@ return [
'enablecolumns' => [ 'enablecolumns' => [
'disabled' => 'hidden' 'disabled' => 'hidden'
], ],
'iconfile' => \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath('ter_fe2') . 'Resources/Public/Icons/version.gif', 'iconfile' => \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ter_fe2')) . 'Resources/Public/Icons/version.gif',
], ],
'interface' => [ 'interface' => [
'showRecordFieldList' => 'title,description,version_number,version_string,upload_date,upload_comment,download_counter,frontend_download_counter,state,em_category,load_order,priority,shy,internal,do_not_load_in_fe,uploadfolder,clear_cache_on_load,module,create_dirs,modify_tables,lock_type,cgl_compliance,cgl_compliance_note,review_state,manual,has_manual,software_relations,author,file_hash,extension_provider,has_zip_file,has_images,composer_info', 'showRecordFieldList' => 'title,description,version_number,version_string,upload_date,upload_comment,download_counter,frontend_download_counter,state,em_category,load_order,priority,shy,internal,do_not_load_in_fe,uploadfolder,clear_cache_on_load,module,create_dirs,modify_tables,lock_type,cgl_compliance,cgl_compliance_note,review_state,manual,has_manual,software_relations,author,file_hash,extension_provider,has_zip_file,has_images,composer_info',
......
...@@ -30,7 +30,7 @@ call_user_func(function () { ...@@ -30,7 +30,7 @@ call_user_func(function () {
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig(' \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig('
mod.wizards.newContentElement.wizardItems.special {\n mod.wizards.newContentElement.wizardItems.special {\n
elements.' . $extIdent . ' {\n elements.' . $extIdent . ' {\n
icon = ' . \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::siteRelPath('ter_fe2') . 'Resources/Public/Images/Wizard.gif\n icon = ' . \TYPO3\CMS\Core\Utility\PathUtility::stripPathSitePrefix(\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath('ter_fe2')) . 'Resources/Public/Images/Wizard.gif\n
title = LLL:EXT:ter_fe2/Resources/Private/Language/locallang_db.xlf:newContentElement.wizardItem.title\n title = LLL:EXT:ter_fe2/Resources/Private/Language/locallang_db.xlf:newContentElement.wizardItem.title\n
description = LLL:EXT:ter_fe2/Resources/Private/Language/locallang_db.xlf:newContentElement.wizardItem.description\n\n description = LLL:EXT:ter_fe2/Resources/Private/Language/locallang_db.xlf:newContentElement.wizardItem.description\n\n
tt_content_defValues {\n tt_content_defValues {\n
......
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