[BUGFIX] Missing column in t3lib_TCEmain::getPreviousLocalizedRecordUid
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_befunc.php
index 186d221..5fc8797 100644 (file)
@@ -488,8 +488,11 @@ final class t3lib_BEfunc {
                foreach ($tc_keys as $table) {
                                // Load table
                        t3lib_div::loadTCA($table);
-                               // All field names configured
-                       if (is_array($GLOBALS['TCA'][$table]['columns'])) {
+                               // All field names configured and not restricted to admins
+                       if (is_array($GLOBALS['TCA'][$table]['columns'])
+                                       && $GLOBALS['TCA'][$table]['ctrl']['adminOnly'] != 1
+                                       && $GLOBALS['TCA'][$table]['ctrl']['rootLevel'] != 1
+                                       ) {
                                $f_keys = array_keys($GLOBALS['TCA'][$table]['columns']);
                                foreach ($f_keys as $field) {
                                        if ($GLOBALS['TCA'][$table]['columns'][$field]['exclude']) {
@@ -2660,11 +2663,14 @@ final class t3lib_BEfunc {
                        if ($page['url_scheme'] == t3lib_utility_Http::SCHEME_HTTPS || ($page['url_scheme'] == 0 && t3lib_div::getIndpEnv('TYPO3_SSL'))) {
                                $protocol = 'https';
                        }
-                       $domainRecord = self::getDomainStartPage($urlParts['host'], $urlParts['path']);
-                       if ($domainRecord && isset($domainRecord['domainName'])) {
-                               $domain = $domainRecord['domainName'];
+
+                       $domainName = self::firstDomainRecord($rootLine);
+
+                       if ($domainName) {
+                               $domain = $domainName;
                        } else {
-                               $domain = self::firstDomainRecord($rootLine);
+                               $domainRecord = self::getDomainStartPage($urlParts['host'], $urlParts['path']);
+                               $domain = $domainRecord['domainName'];
                        }
 
                        if ($domain) {