Fixed bug #15995: Bug: doktype limitation is not applied to alternative page language...
authorSteffen Kamper <info@sk-typo3.de>
Wed, 3 Nov 2010 17:35:43 +0000 (17:35 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Wed, 3 Nov 2010 17:35:43 +0000 (17:35 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@9258 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php
t3lib/class.t3lib_tceforms_inline.php
t3lib/class.t3lib_tcemain.php

index 46df16e..42df893 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,6 @@
 2010-11-03  Steffen Kamper  <steffen@typo3.org>
 
+       * Fixed bug #15995: Bug: doktype limitation is not applied to alternative page languages (pages_language_overlay) (Thanks to Andreas Kiessling)
        * Fixed bug #16225: Disable draft workspace and migrate it to a real workspace (Thanks to Tolleiv Nietsch)
        * Added feature #16228: [Feature] TCA tree (Thanks to Steffen Ritter)
 
index 747f589..5362c1d 100644 (file)
@@ -1549,7 +1549,7 @@ class t3lib_TCEforms      {
                        }
 
                                // Removing doktypes with no access:
-                       if ($table.'.'.$field == 'pages.doktype')       {
+                       if (($table === 'pages' || $table === 'pages_language_overlay') && $field === 'doktype') {
                                if (!($GLOBALS['BE_USER']->isAdmin() || t3lib_div::inList($GLOBALS['BE_USER']->groupData['pagetypes_select'],$p[1])))   {
                                        unset($selItems[$tk]);
                                }
index dcfe224..17ef880 100644 (file)
@@ -1623,7 +1623,7 @@ class t3lib_TCEforms_inline {
                                }
 
                                        // Removing doktypes with no access:
-                               if ($table.'.'.$field == 'pages.doktype')       {
+                               if (($table === 'pages' || $table === 'pages_language_overlay') && $field === 'doktype') {
                                        if (!($GLOBALS['BE_USER']->isAdmin() || t3lib_div::inList($GLOBALS['BE_USER']->groupData['pagetypes_select'],$p[1])))   {
                                                unset($selItems[$tk]);
                                        }
index 21f61c3..d515f03 100644 (file)
@@ -1248,7 +1248,7 @@ class t3lib_TCEmain       {
                $recFID = $table.':'.$id.':'.$field;
 
                        // Processing special case of field pages.doktype
-               if ($table=='pages' && $field=='doktype')       {
+               if (($table === 'pages' || $table === 'pages_language_overlay') && $field === 'doktype') {
                                // If the user may not use this specific doktype, we issue a warning
                        if (! ($this->admin || t3lib_div::inList($this->BE_USER->groupData['pagetypes_select'],$value)))        {
                                $propArr = $this->getRecordProperties($table,$id);