[BUGFIX] Database updates not working for translations with TYPO3 8.0 55/51155/2
authorStanislas Rolland <typo3@sjbr.ca>
Thu, 5 Jan 2017 21:54:03 +0000 (16:54 -0500)
committerStanislas Rolland <typo3@sjbr.ca>
Thu, 5 Jan 2017 21:56:50 +0000 (22:56 +0100)
Change-Id: Ifd39ec3debaf7d9de4a725dc5a2a38d8e36f0096
Resolves: #79172
Reviewed-on: https://review.typo3.org/51155
Reviewed-by: Stanislas Rolland <typo3@sjbr.ca>
Tested-by: Stanislas Rolland <typo3@sjbr.ca>
ChangeLog
Classes/Utility/DatabaseUpdateUtility.php

index 4422ffa..f525600 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2017-01-05  Stanislas Rolland  <typo3(arobas)sjbr.ca>
 
        * Resolves #79174: Let the SelectViewHelper accept correct values
+       * Resolves #79172: Database updates not working for translations with TYPO3 8.0
 
 2016-07-14  Stanislas Rolland  <typo3(arobas)sjbr.ca>
 
index 3e0d8be..2fcf4cc 100644 (file)
@@ -1,9 +1,10 @@
 <?php
 namespace SJBR\StaticInfoTables\Utility;
+
 /***************************************************************
  *  Copyright notice
  *
- *  (c) 2013-2015 StanislasRolland <typo3@sjbr.ca>
+ *  (c) 2013-2017 StanislasRolland <typo3@sjbr.ca>
  *  All rights reserved
  *
  *  This script is part of the Typo3 project. The Typo3 project is
@@ -29,8 +30,8 @@ use TYPO3\CMS\Core\Utility\GeneralUtility;
 /**
  * Utility used by the update script of the base extension and of the language packs
  */
-class DatabaseUpdateUtility {
-
+class DatabaseUpdateUtility
+{
        /**
         * @var string Name of the extension this class belongs to
         */
@@ -47,7 +48,8 @@ class DatabaseUpdateUtility {
         * @param \TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager
         * @return void
         */
-       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager) {
+       public function injectObjectManager(\TYPO3\CMS\Extbase\Object\ObjectManagerInterface $objectManager)
+       {
                $this->objectManager = $objectManager;
        }
 
@@ -57,7 +59,8 @@ class DatabaseUpdateUtility {
         * @param string $extensionKey: extension key of the language pack
         * @return void
         */
-       public function doUpdate($extensionKey) {
+       public function doUpdate($extensionKey)
+       {
                $extPath = ExtensionManagementUtility::extPath($extensionKey);
                $fileContent = explode(LF, GeneralUtility::getUrl($extPath . 'ext_tables_static+adt.sql'));
                // SQL parser was moved from core to dbal in TYPO3 CMS 7.5
@@ -77,7 +80,7 @@ class DatabaseUpdateUtility {
                                foreach ($parsedResult['FIELDS'] as $fN => $fV) {
                                        $fields[$fN] = $fV[0];
                                }
-                               $res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery($parsedResult['TABLE'], $whereClause, $fields, TRUE);
+                               $res = $GLOBALS['TYPO3_DB']->exec_UPDATEquery($parsedResult['TABLE'], $whereClause, $fields);
                        }
                }
        }