Commit ede919ce authored by Dirk Wildt's avatar Dirk Wildt

4.2.0

parent f85c4c53
4.1.4
4.2.0
2019-05-05
Feature
* #i0031: SQL mode
New Constant Editor category [LAUNCH - INSTALLER - SQL]
New files
* Configuration/TypoScript/Installer/tx_launch_pi1/settings/sql/*
Affected files
* Classes/Controller/AbstractController.php
:ref:
* https://dev.mysql.com/doc/refman/5.7/en/sql-mode.html
Improvement
* #i0032: (c) 2019
4.1.4
2018-12-21
Improvement
* #i0030: Manual
4.1.3
Improvement
2018-11-29
Improvement
* #i0029: Update _zzDieWiPrompt(): Manual for repair the database in case of SQL-Error
4.1.2
Improvement
2018-11-21
Improvement
* #i0028: Update TYPO3 version in ext_emconf.php: 9.9.999
* #i0027: Move code
* from: Configuration/TCA/Overrides/sys_template.php
......@@ -22,13 +36,13 @@
:REF: #i0023
4.1.1
Bugfix
2018-06-16
Bugfix
* #i0026: Remove var_dump(...)
4.1.0
Feature
2018-06-16
Feature
* #i0025: Get support for COA elements 10, 20, 30, ... as XML tag:
You may use: <_10>...</_10>
This will moved to a json string like: ...,"_10":{... replaced and moved to an array
......@@ -36,8 +50,8 @@
* Classes/Controller/AbstractController.php
4.0.1
Bugfix
2018-03-11
Bugfix
* #i0024: Documentation: Bugfix hyperlink to the forum
4.0.0
......
......@@ -10,7 +10,7 @@ use TYPO3\CMS\Core\Configuration\ExtensionConfiguration;
/* * *************************************************************
* Copyright notice
*
* (c) 2017-2018 - Dirk Wildt <http://wildt.at.die-netzmacher.de>
* (c) 2017-2019 - Dirk Wildt <http://wildt.at.die-netzmacher.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
......@@ -117,6 +117,11 @@ class AbstractController extends ActionController
*/
private $_sLanguageFilePath = 'Resources/Private/Language/Installer.xlf';
/**
* @var string SQL mode
*/
private $_sSQLMode;
/**
* _SQLError( ) :
*
......@@ -196,6 +201,7 @@ class AbstractController extends ActionController
*/
private function _SQLInsert( $table, $data, $line, $bPromptQueryOnly = 0 )
{
$this->_SQLModeSet();
$query = $GLOBALS[ 'TYPO3_DB' ]->INSERTquery(
$table
, $data
......@@ -219,6 +225,74 @@ class AbstractController extends ActionController
$this->_aTableSQLLastID[ $table ] = $GLOBALS[ 'TYPO3_DB' ]->sql_insert_id();
break;
}
$this->_SQLModeReset();
}
/**
* _SQLModeReset( ) :
*
* @return void
* @access private
* @version 4.2.0
* @since 4.2.0
* @internal #i0031
*/
private function _SQLModeReset()
{
$sqlMode = $this->settings[ 'sql.' ][ 'mode' ];
if( $sqlMode )
{
return;
}
$query = 'SET SESSION SQL_MODE = "' . $this->_sSQLMode . '"';
$GLOBALS[ 'TYPO3_DB' ]->sql_query( $query );
$this->_SQLError( $query, __LINE__ );
}
/**
* _SQLModeSet( ) :
*
* @return void
* @access private
* @version 4.2.0
* @since 4.2.0
* @internal #i0031
*/
private function _SQLModeSet()
{
$sqlMode = $this->settings[ 'sql.' ][ 'mode' ];
if( $sqlMode )
{
return;
}
$this->_setSQLMode( __LINE__ );
$query = 'SET SESSION SQL_MODE = "' . $sqlMode . '"';
$GLOBALS[ 'TYPO3_DB' ]->sql_query( $query );
$this->_SQLError( $query, __LINE__ );
}
/**
* _setSQLMode( ) :
*
* @param integer $line
* @return void
* @access private
* @version 4.2.0
* @since 4.2.0
* @internal #i0031
*/
private function _setSQLMode( $line = __LINE__ )
{
$query = 'SELECT @@SESSION.sql_mode AS mode;';
$res = $GLOBALS[ 'TYPO3_DB' ]->sql_query( $query );
$this->_SQLError( $query, $line );
$row = $GLOBALS[ 'TYPO3_DB' ]->sql_fetch_row( $res );
$this->_sSQLMode = $row[ 0 ];
}
/**
......@@ -237,7 +311,7 @@ class AbstractController extends ActionController
{
// #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
......@@ -283,6 +357,7 @@ class AbstractController extends ActionController
*/
private function _SQLUpdate( $table, $where, $data, $uid, $line, $bPromptQueryOnly = 0 )
{
$this->_SQLModeSet();
$query = $GLOBALS[ 'TYPO3_DB' ]->UPDATEquery(
$table
, $where
......@@ -305,6 +380,7 @@ class AbstractController extends ActionController
$this->_SQLError( $query, $line );
break;
}
$this->_SQLModeReset();
}
/**
......@@ -1204,7 +1280,7 @@ class AbstractController extends ActionController
$replacement = ',"$1":{';
$sXml = json_encode( ( array ) $aXml );
//var_dump( __METHOD__, __LINE__, $sXml);
$sXml = preg_replace($regex, $replacement, $sXml);
$sXml = preg_replace( $regex, $replacement, $sXml );
$aXml = json_decode( $sXml, true );
return $aXml;
}
......
......@@ -5,7 +5,7 @@ namespace Netzmacher\Launch\Controller;
/* * *************************************************************
* Copyright notice
*
* (c) 2017-2018 - Dirk Wildt <http://wildt.at.die-netzmacher.de>
* (c) 2017-2019 - Dirk Wildt <http://wildt.at.die-netzmacher.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
......
......@@ -7,7 +7,7 @@ use TYPO3\CMS\Extbase\Utility\LocalizationUtility;
/* * *************************************************************
* Copyright notice
*
* (c) 2015-2018 - Dirk Wildt <http://wildt.at.die-netzmacher.de>
* (c) 2015-2019 - Dirk Wildt <http://wildt.at.die-netzmacher.de>
* All rights reserved
*
* This script is part of the TYPO3 project. The TYPO3 project is
......
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:launch/Configuration/TypoScript/Installer/tx_launch_pi1/settings/_constants.ts">
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:launch/Configuration/TypoScript/Installer/tx_launch_pi1/view/constants.ts">
\ No newline at end of file
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:launch/Configuration/TypoScript/Installer/tx_launch_pi1/settings/sql/constants.ts">
......@@ -11,4 +11,5 @@ plugin {
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:launch/Configuration/TypoScript/Installer/tx_launch_pi1/settings/configuration.ts">
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:launch/Configuration/TypoScript/Installer/tx_launch_pi1/settings/development.ts">
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:launch/Configuration/TypoScript/Installer/tx_launch_pi1/settings/flexform.ts">
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:launch/Configuration/TypoScript/Installer/tx_launch_pi1/settings/searchandreplace.ts">
\ No newline at end of file
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:launch/Configuration/TypoScript/Installer/tx_launch_pi1/settings/searchandreplace.ts">
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:launch/Configuration/TypoScript/Installer/tx_launch_pi1/settings/sql/setup.ts">
\ No newline at end of file
plugin.tx_launch_pi1 {
sql {
# cat=Launch - Installer - Sql//100; type=options[,NO_ENGINE_SUBSTITUTION]; label= Mode:NO_ENGINE_SUBSTITUTION enables SQL downwards compatibility. It is needed while runtime.
mode = NO_ENGINE_SUBSTITUTION
}
}
plugin {
tx_launch_pi1 {
// empty statement for proper comments only
settings {
}
// sql
settings =
settings {
// mode = {$plugin.tx_launch_pi1.sql.mode}
sql =
sql {
//
mode = {$plugin.tx_launch_pi1.sql.mode}
}
}
}
}
\ No newline at end of file
......@@ -12,7 +12,7 @@
Illegal String Offset
=====================
Some times - only in the modul web > pages - you will get the erroer prompt
Some times - only in the modul web > pages - you will get the error prompt
* PHP Warning: Illegal string offset 'templateTutorial' in /.../typo3/sysext/extbase/Classes/Service/FlexFormService.php
......
......@@ -34,7 +34,7 @@ Launch it!
launch, installer
:Copyright:
2017-2018
2017-2019
:Author:
Dirk Wildt (Die Netzmacher)
......@@ -62,4 +62,5 @@ Launch it!
Users/Index
Administrators/Index
Developers/Index
WhatsNew/Index
Help/Index
\ No newline at end of file
[general]
copyright = 2017-2018
copyright = 2017-2019
project = Launch it!
release = 4.1.4
version = 4.1
release = 4.2.0
version = 4.2
[html_theme_options]
github_branch =
......
conf.py:
copyright: 2017-2018
copyright: 2017-2019
project: Launch it!
version: 4.1
release: 4.1.4
version: 4.2
release: 4.2.0
latex_documents:
- - Index
- launch.tex
......
.. ==================================================
.. FOR YOUR INFORMATION
.. --------------------------------------------------
.. -*- coding: utf-8 -*- with BOM.
.. include:: ../Includes.txt
.. _wahtsnew:
What's new
==========
SQL mode
--------
4.2.0
SQL mode is set temporarily to NO_ENGINE_SUBSTITUTION while runtime.
This enables
* SQL downwards compatibility
* and to insert strings in integer fields temporarily.
Details @ ChangeLog.
\ No newline at end of file
......@@ -6,7 +6,7 @@ $EM_CONF[$_EXTKEY] = [
'state' => 'stable',
'author' => 'Dirk Wildt (Die Netzmacher)',
'author_email' => 'http://wildt.at.die-netzmacher.de',
'version' => '4.1.4',
'version' => '4.2.0',
'constraints' => [
'depends' => [
'refresh' => '',
......
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