...
 
Commits (3)
UPGRADE for TYPO3 9.x. YOU NEED Refresh - the TYPO3 Compatibility Class. See: https://typo3-browser-forum.de/sponsoring/refresh/
UPGRADE for TYPO3 9.0. You need Refresh - the TYPO3 Compatibility Class.
4.0.0
Upgrade for TYPO3 9.0
2017-12-27
* #i0023: * Different ext_tables.php for TYPO3 8.7 and 9.x
* TYPO3 9.0: method addPlugin() got the 3rd argument extKey
* Method addStaticFile() is moved from ext_tables to Configuration/TCA/Overrides/sys_template.php
* $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXT' ][ 'extConf' ][ 'launch' ] must replaced with GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('launch')
* $GLOBALS[ 'TYPO3_DB' ]->SELECTquery > \Netzmacher\Refresh\Compatibility\Core\Database\DatabaseConnection::SELECTquery
3.0.3
Improvement
......
......@@ -5,6 +5,7 @@ namespace Netzmacher\Launch\Controller;
use TYPO3\CMS\Core\Resource\ResourceFactory;
use TYPO3\CMS\Core\Utility\GeneralUtility;
use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
/* * *************************************************************
* Copyright notice
......@@ -35,7 +36,7 @@ use TYPO3\CMS\Extbase\Mvc\Controller\ActionController;
* @package TYPO3
* @subpackage launch
* @author Dirk Wildt <http://wildt.at.die-netzmacher.de>
* @version 2.4.1
* @version 4.0.0
* @since 2.0.0
*/
class AbstractController extends ActionController
......@@ -155,8 +156,8 @@ class AbstractController extends ActionController
* @param boolean $bPromptQueryOnly
* @return void
* @access private
* @version 8.0.18
* @since 8.0.18
* @version 2.0.0
* @since 2.0.0
*/
private function _SQLDelete( $table, $where, $line, $bPromptQueryOnly = 0 )
{
......@@ -229,19 +230,23 @@ class AbstractController extends ActionController
* @param boolean $bPromptQueryOnly
* @return void
* @access private
* @version 8.0.18
* @since 8.0.18
* @version 4.0.0
* @since 2.0.0
*/
private function _SQLSelect( $fields, $table, $where, $groupBy = '', $orderBy = '', $limit = '', $line = __LINE__, $bPromptQueryOnly = 0 )
{
$query = $GLOBALS[ 'TYPO3_DB' ]->SELECTquery(
$fields
, $table
, $where
, $groupBy = ''
, $orderBy = ''
, $limit = ''
);
// #i0023, 171227, dwildt, 1+
$query = \Netzmacher\Refresh\Compatibility\Core\Database\DatabaseConnection::SELECTquery( $fields, $table, $where, $groupBy, $orderBy, $limit );
// #i0023, 171227, dwildt, -
// $query = $GLOBALS[ 'TYPO3_DB' ]->SELECTquery(
// $fields
// , $table
// , $where
// , $groupBy = ''
// , $orderBy = ''
// , $limit = ''
// );
switch( true )
{
......@@ -302,6 +307,24 @@ class AbstractController extends ActionController
}
}
/**
* _cObjGetSingle( ) :
*
* @param array $record
* @return string $value
* @access private
* @version 2.0.0
* @since 2.0.0
*/
private function _cObjGetSingle( $record )
{
$name = $record[ '_typoScriptNodeValue' ];
$conf = $this->_oTypoScriptService->convertPlainArrayToTypoScriptArray( $record );
$value = $this->_oCObj->cObjGetSingle( $name, $conf );
return $value;
}
/**
* _cObjGetSingleArray( ) :
*
......@@ -330,39 +353,6 @@ class AbstractController extends ActionController
return $destRecords;
}
/**
* _cObjGetSingle( ) :
*
* @param array $record
* @return string $value
* @access private
* @version 2.0.0
* @since 2.0.0
*/
private function _cObjGetSingle( $record )
{
$name = $record[ '_typoScriptNodeValue' ];
$conf = $this->_oTypoScriptService->convertPlainArrayToTypoScriptArray( $record );
$value = $this->_oCObj->cObjGetSingle( $name, $conf );
return $value;
}
/**
* _clearCache( ) :
*
* @return void
* @access private
* @version 2.0.0
* @since 2.0.0
*/
private function _clearCache()
{
$query = 'TRUNCATE `cf_cache_pages`';
$GLOBALS[ 'TYPO3_DB' ]->sql_query( $query );
$this->_SQLError( $query, __LINE__ );
}
/**
* _deleteDirectory( ) :
*
......@@ -484,7 +474,7 @@ class AbstractController extends ActionController
* @return void
* @access private
* @version 8.0.0
* @since 1.0.0
* @since 2.0.0
*/
private function _directoryCopy( $srceDir, $destDir, $relative = 1 )
{
......@@ -516,7 +506,7 @@ class AbstractController extends ActionController
* @return void
* @access private
* @version 8.0.0
* @since 1.0.0
* @since 2.0.0
*/
private function _directoryCopyFile( $srceFile, $destPath )
{
......@@ -545,7 +535,7 @@ class AbstractController extends ActionController
* @return string
* @access private
* @version 8.0.0
* @since 1.0.0
* @since 2.0.0
*/
private function _fileToDest( $srceFile, $destPath = null )
{
......@@ -578,7 +568,7 @@ class AbstractController extends ActionController
* @return void
* @access private
* @version 8.0.0
* @since 1.0.0
* @since 2.0.0
*/
private function _directoryMkDir( $dir )
{
......@@ -890,7 +880,11 @@ class AbstractController extends ActionController
*/
private function _initExtConf()
{
$this->_aExtConf = unserialize( $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXT' ][ 'extConf' ][ 'browser' ] );
// #i0023, 171227, dwildt, -: launch hasn't any own extConf
// $this->_aExtConf = unserialize( $GLOBALS[ 'TYPO3_CONF_VARS' ][ 'EXT' ][ 'extConf' ][ 'launch' ] );
// $backendConfiguration = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('launch');
// var_dump(__METHOD__, __LINE__, $this->_aExtConf, $backendConfiguration);
// die();
}
/**
......@@ -930,6 +924,7 @@ class AbstractController extends ActionController
private function _initLLDefault( $pathToLL )
{
$this->_oPlugin->pi_loadLL( $pathToLL );
//var_dump(__METHOD__, __LINE__, $this->_oPlugin->LOCAL_LANG);
}
/**
......
<?php
if( !defined( 'TYPO3_MODE' ) )
{
die( 'Access denied.' );
}
/* * ****************************************************************************
* Set TYPO3 version
* **************************************************************************** */
// #t0606, 160216, dwildt, +
list( $main, $sub, $bugfix ) = explode( '.', TYPO3_version );
$version = ( ( int ) $main ) * 1000000;
$version = $version + ( ( int ) $sub ) * 1000;
$version = $version + ( ( int ) $bugfix ) * 1;
/* * ****************************************************************************
* Include static templates
* **************************************************************************** */
// #i0023, 171227, dwildt, 4-
//\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( $_EXTKEY, 'Configuration/TypoScript/StyledContent/CSS/', 'Launch [0] CSS Styled Content' );
//\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( $_EXTKEY, 'Configuration/TypoScript/StyledContent/Fluid/', 'Launch [0] Fluid Styled Content' );
//\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( $_EXTKEY, 'Configuration/TypoScript/Page/', 'Launch [1] Page' );
//\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( $_EXTKEY, 'Configuration/TypoScript/Installer/', 'Launch [2] Installer' );
/* * ****************************************************************************
* Plugin 1 configuration: Installer
* **************************************************************************** */
TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$_EXTKEY
, 'Pi1'
, 'LLL:EXT:launch/Resources/Private/Language/Installer.xlf:tt_content.Installer'
, Netzmacher\Refresh\Compatibility\Core\Utility\ExtensionManagementUtility::extRelPath( $_EXTKEY ) . 'ext_icon.svg'
);
$pluginSignature = str_replace( '_', '', $_EXTKEY ) . '_pi1';
$TCA[ 'tt_content' ][ 'types' ][ 'list' ][ 'subtypes_excludelist' ][ $pluginSignature ] = 'layout,select_key,pages,recursive';
$TCA[ 'tt_content' ][ 'types' ][ 'list' ][ 'subtypes_addlist' ][ $pluginSignature ] = 'pi_flexform';
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/Installer/flexform.xml'
);
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
[
'LLL:EXT:launch/Resources/Private/Language/Installer.xlf:tt_content.Installer'
, $pluginSignature
, 'EXT:launch/ext_icon.svg'
]
, 'list_type'
);
\ No newline at end of file
<?php
if( !defined( 'TYPO3_MODE' ) )
{
die( 'Access denied.' );
}
/* * ****************************************************************************
* Set TYPO3 version
* **************************************************************************** */
// #t0606, 160216, dwildt, +
list( $main, $sub, $bugfix ) = explode( '.', TYPO3_version );
$version = ( ( int ) $main ) * 1000000;
$version = $version + ( ( int ) $sub ) * 1000;
$version = $version + ( ( int ) $bugfix ) * 1;
/* * ****************************************************************************
* Plugin 1 configuration: Installer
* **************************************************************************** */
TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$_EXTKEY
, 'Pi1'
, 'LLL:EXT:launch/Resources/Private/Language/Installer.xlf:tt_content.Installer'
, Netzmacher\Refresh\Compatibility\Core\Utility\ExtensionManagementUtility::extRelPath( $_EXTKEY ) . 'ext_icon.svg'
);
$pluginSignature = str_replace( '_', '', $_EXTKEY ) . '_pi1';
$TCA[ 'tt_content' ][ 'types' ][ 'list' ][ 'subtypes_excludelist' ][ $pluginSignature ] = 'layout,select_key,pages,recursive';
$TCA[ 'tt_content' ][ 'types' ][ 'list' ][ 'subtypes_addlist' ][ $pluginSignature ] = 'pi_flexform';
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/Installer/flexform.xml'
);
// #i0023, 171227, dwildt, +$_EXTKEY
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
[
'LLL:EXT:launch/Resources/Private/Language/Installer.xlf:tt_content.Installer'
, $pluginSignature
, 'EXT:launch/ext_icon.svg'
]
, 'list_type'
, $_EXTKEY
);
\ No newline at end of file
<?php
/* * ****************************************************************************
* Include static templates
* **************************************************************************** */
// #i0023, 171227, dwildt, 4+
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( 'launch', 'Configuration/TypoScript/StyledContent/CSS/', 'Launch [0] CSS Styled Content' );
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( 'launch', 'Configuration/TypoScript/StyledContent/Fluid/', 'Launch [0] Fluid Styled Content' );
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( 'launch', 'Configuration/TypoScript/Page/', 'Launch [1] Page' );
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( 'launch', 'Configuration/TypoScript/Installer/', 'Launch [2] Installer' );
......@@ -29,7 +29,6 @@ plugin {
en = There is a conflict with this extension. You must disable it!
}
}
}
title = TEXT
title {
value = Label (set by Launch)
......@@ -38,6 +37,7 @@ plugin {
en = Label (set by Launch)
}
}
}
xml =
}
// defaults, xml
......
<?php
$EM_CONF[ $_EXTKEY ] = [
$EM_CONF[$_EXTKEY] = [
'title' => 'Launch it!',
'description' => 'Launch your TYPO3-project! Install whole TYPO3-websites. Controlled by your XML-files.',
'category' => 'plugin',
'state' => 'stable',
'author' => 'Dirk Wildt (Die Netzmacher)',
'author_email' => 'http://wildt.at.die-netzmacher.de',
'state' => 'stable',
'internal' => '',
'uploadfolder' => '0',
'createDirs' => '',
'clearCacheOnLoad' => 0,
'version' => '3.0.3',
'constraints' => [
'depends' => [
'version' => '4.0.0',
'constraints' => [
'depends' => [
'refresh' => '',
'typo3' => '6.2.0-8.9.99',
],
'conflicts' => [ ],
'suggests' => [ ],
],
'typo3' => '6.2.0-9.0.99',
],
'conflicts' => [],
'suggests' => [],
],
];
......@@ -9,42 +9,20 @@ if( !defined( 'TYPO3_MODE' ) )
* Set TYPO3 version
* **************************************************************************** */
// #t0606, 160216, dwildt, +
list( $main, $sub, $bugfix ) = explode( '.', TYPO3_version );
$version = ( ( int ) $main ) * 1000000;
$version = $version + ( ( int ) $sub ) * 1000;
$version = $version + ( ( int ) $bugfix ) * 1;
$typo3Version = ( ( int ) $main ) * 1000000;
$typo3Version = $typo3Version + ( ( int ) $sub ) * 1000;
$typo3Version = $typo3Version + ( ( int ) $bugfix ) * 1;
/* * ****************************************************************************
* Include static templates
* **************************************************************************** */
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( $_EXTKEY, 'Configuration/TypoScript/StyledContent/CSS/', 'Launch [0] CSS Styled Content' );
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( $_EXTKEY, 'Configuration/TypoScript/StyledContent/Fluid/', 'Launch [0] Fluid Styled Content' );
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( $_EXTKEY, 'Configuration/TypoScript/Page/', 'Launch [1] Page' );
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile( $_EXTKEY, 'Configuration/TypoScript/Installer/', 'Launch [2] Installer' );
/* * ****************************************************************************
* Plugin 1 configuration: Installer
* **************************************************************************** */
TYPO3\CMS\Extbase\Utility\ExtensionUtility::registerPlugin(
$_EXTKEY
, 'Pi1'
, 'LLL:EXT:launch/Resources/Private/Language/Installer.xlf:tt_content.Installer'
, Netzmacher\Refresh\Compatibility\Core\Utility\ExtensionManagementUtility::extRelPath( $_EXTKEY ) . 'ext_icon.svg'
);
$pluginSignature = str_replace( '_', '', $_EXTKEY ) . '_pi1';
$TCA[ 'tt_content' ][ 'types' ][ 'list' ][ 'subtypes_excludelist' ][ $pluginSignature ] = 'layout,select_key,pages,recursive';
$TCA[ 'tt_content' ][ 'types' ][ 'list' ][ 'subtypes_addlist' ][ $pluginSignature ] = 'pi_flexform';
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPiFlexFormValue(
$pluginSignature, 'FILE:EXT:' . $_EXTKEY . '/Configuration/FlexForms/Installer/flexform.xml'
);
TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPlugin(
[
'LLL:EXT:launch/Resources/Private/Language/Installer.xlf:tt_content.Installer'
, $pluginSignature
, 'EXT:launch/ext_icon.svg'
]
, 'list_type'
);
\ No newline at end of file
switch( TRUE )
{
case($typo3Version < 7006000):
case($typo3Version < 8007000):
case($typo3Version < 9000000):
require( PATH_typo3conf . 'ext/launch/Configuration/ExtTables/8.7/index.php' );
break;
case($typo3Version >= 9000000):
default:
require( PATH_typo3conf . 'ext/launch/Configuration/ExtTables/9.0/index.php' );
break;
}
\ No newline at end of file