[BUGFIX] Identity does not provide uuid column to cache tables anymore.
authortmaroschik <tmaroschik@735d13b6-9817-0410-8766-e36946ffe9aa>
Mon, 19 Sep 2011 08:41:26 +0000 (08:41 +0000)
committertmaroschik <tmaroschik@735d13b6-9817-0410-8766-e36946ffe9aa>
Mon, 19 Sep 2011 08:41:26 +0000 (08:41 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Extensions/identity/trunk@52213 735d13b6-9817-0410-8766-e36946ffe9aa

Classes/Map.php
Classes/Utility/FieldDefinitions.php

index eda7ab9..9c930dd 100644 (file)
@@ -163,6 +163,9 @@ class Tx_Identity_Map implements t3lib_Singleton {
         * @api
         */
        public function getIdentifierForResourceLocation($tablename, $uid) {
+               if (!$this->isApplicable($tablename)) {
+                       return;
+               }
                $this->initializeObject();
                if (isset($this->tableSpecificIdentityProviders[$tablename])) {
                        // Look for a more specific identity provider first
@@ -180,6 +183,9 @@ class Tx_Identity_Map implements t3lib_Singleton {
         * @return void
         */
        public function getIdentifierForNewResourceLocation($tablename) {
+               if (!$this->isApplicable($tablename)) {
+                       return;
+               }
                $this->initializeObject();
                if (isset($this->tableSpecificIdentityProviders[$tablename])) {
                        return $this->tableSpecificIdentityProviders[$tablename]['provider']->getIdentifierForNewResourceLocation($tablename);
@@ -214,6 +220,17 @@ class Tx_Identity_Map implements t3lib_Singleton {
                return $this->defaultIdentityProvider['provider']->getResourceLocationForIdentifier($identifier);
        }
 
+       /**
+        * @param string $tablename
+        * @return bool
+        */
+       public function isApplicable($tablename) {
+               return t3lib_div::isFirstPartOfStr($tablename, 'tt_')
+                       || t3lib_div::isFirstPartOfStr($tablename, 'tx_')
+                       || t3lib_div::isFirstPartOfStr($tablename, 'static_')
+                       || $tablename === 'pages';
+       }
+
 
        /**
         * Give all providers the chance to perform some kind of rebuild
index 613e8ca..1408ed6 100644 (file)
@@ -114,7 +114,12 @@ class Tx_Identity_Utility_FieldDefinitions {
        protected function getIdentityFieldDefintions(array $tableDefinitions) {
                $identityFieldDefintions = array();
 
+               /** @var $identityConfigurationCheck Tx_Identity_Configuration_Check */
                $identityConfigurationCheck = t3lib_div::makeInstance('Tx_Identity_Configuration_Check');
+
+               /** @var $identityMap Tx_Identity_Map */
+               $identityMap = t3lib_div::makeInstance('Tx_Identity_Map');
+
                $identityConfiguration = $GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['identity'];
                $identityProviders = $identityConfiguration[Tx_Identity_Configuration_IdentityProviderInterface::PROVIDERS_LIST];
 
@@ -127,13 +132,7 @@ class Tx_Identity_Utility_FieldDefinitions {
                                                $this->ignoreTCA
                                                && in_array('uid', array_keys($definition['fields']))
                                                && in_array('pid', array_keys($definition['fields']))
-                                               && (
-                                                               t3lib_div::isFirstPartOfStr($table, 'tx_')
-                                                               || t3lib_div::isFirstPartOfStr($table, 'tt_')
-                                                               || t3lib_div::isFirstPartOfStr($table, 'static_')
-                                                               || $table == 'pages'
-                                                               || $table == 'tt_content'
-                                                       )
+                                               && $identityMap->isApplicable($table)
                                )
                        ) {