[!!!][TASK] Remove deprecated getUniqueFields function from DataHandler 45/32945/3
authorWouter Wolters <typo3@wouterwolters.nl>
Tue, 23 Sep 2014 18:12:50 +0000 (20:12 +0200)
committerChristian Kuhn <lolli@schwarzbu.ch>
Wed, 24 Sep 2014 11:05:35 +0000 (13:05 +0200)
Resolves: #61822
Releases: master
Change-Id: I1d150653fed952560f08a9faab719128f38f66c4
Reviewed-on: http://review.typo3.org/32945
Reviewed-by: Stefan Neufeind <typo3.neufeind@speedpartner.de>
Reviewed-by: Markus Klein <klein.t3@reelworx.at>
Tested-by: Markus Klein <klein.t3@reelworx.at>
Reviewed-by: Christian Kuhn <lolli@schwarzbu.ch>
Tested-by: Christian Kuhn <lolli@schwarzbu.ch>
typo3/sysext/core/Classes/DataHandling/DataHandler.php
typo3/sysext/core/Documentation/Changelog/master/Breaking-61822-GetUniqueFieldsFunctionRemoved.rst [new file with mode: 0644]

index 65a0b36..1b47797 100644 (file)
@@ -6742,29 +6742,6 @@ class DataHandler {
        }
 
        /**
-        * Returns all fieldnames from a table which have the unique evaluation type set.
-        *
-        * @param string $table Table name
-        * @return array Array of fieldnames
-        * @deprecated since 6.1, will be removed in two versions, use \TYPO3\CMS\Version\Hook\DataHandlerHook::getUniqueFields() instead
-        */
-       public function getUniqueFields($table) {
-               GeneralUtility::logDeprecatedFunction();
-               $listArr = array();
-               if ($GLOBALS['TCA'][$table]['columns']) {
-                       foreach ($GLOBALS['TCA'][$table]['columns'] as $field => $configArr) {
-                               if ($configArr['config']['type'] === 'input') {
-                                       $evalCodesArray = GeneralUtility::trimExplode(',', $configArr['config']['eval'], TRUE);
-                                       if (in_array('uniqueInPid', $evalCodesArray) || in_array('unique', $evalCodesArray)) {
-                                               $listArr[] = $field;
-                                       }
-                               }
-                       }
-               }
-               return $listArr;
-       }
-
-       /**
         * Returns TRUE if the TCA/columns field type is a DB reference field
         *
         * @param array $conf Config array for TCA/columns field
diff --git a/typo3/sysext/core/Documentation/Changelog/master/Breaking-61822-GetUniqueFieldsFunctionRemoved.rst b/typo3/sysext/core/Documentation/Changelog/master/Breaking-61822-GetUniqueFieldsFunctionRemoved.rst
new file mode 100644 (file)
index 0000000..4f5cadf
--- /dev/null
@@ -0,0 +1,27 @@
+==============================================================
+Breaking: #61822 - deprecated getUniqueFields function removed
+==============================================================
+
+Description
+===========
+
+The getUniqueFields function from \TYPO3\CMS\Core\DataHandling\DataHandler is removed.
+The function is available in \TYPO3\CMS\Version\Hook\DataHandlerHook
+
+Impact
+======
+
+Extensions that still use the function getUniqueFields won't work.
+
+
+Affected installations
+======================
+
+A TYPO3 instance is affected if a 3rd party extension uses the removed function.
+
+
+Migration
+=========
+
+Replace all calls to \TYPO3\CMS\Core\DataHandling\DataHandler::getUniqueFields
+with calls to \TYPO3\CMS\Version\Hook\DataHandlerHook::getUniqueFields
\ No newline at end of file