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

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

index 0056640..4a457f7 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+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)
+
 2010-11-03  Stanislas Rolland  <typo3@sjbr.ca>
 
        * Fixed bug #16175: htmlArea RTE: The path of classesAnchor images are modified when saving
index 97efeab..151f28e 100644 (file)
@@ -1527,7 +1527,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]);
                                }
@@ -2807,7 +2807,7 @@ class t3lib_TCEforms      {
                                                        $s = t3lib_div::revExplode('[]',$formPrefix,2);
                                                        $actionFieldName = '_ACTION_FLEX_FORM'.$PA['itemFormElName'].$s[0].'][_ACTION]['.$s[1];
 
-                                                               // Push the container to DynNestedStack as it may be toggled                                                    
+                                                               // Push the container to DynNestedStack as it may be toggled
                                                        $this->pushToDynNestedStack('flex' , $idTagPrefix);
 
                                                                // Putting together the container:
@@ -6103,7 +6103,7 @@ class t3lib_TCEforms      {
                                                }
 
                                                        // New records in a workspace are not handled as a version record
-                                                       // if it's no new version, we detect versions like this: 
+                                                       // if it's no new version, we detect versions like this:
                                                        // -- if user is in workspace: always true
                                                        // -- if editor is in live ws: only true if pid == -1
                                                $isVersion = ($isUserInWorkspace || $isRecordDetectedAsVersion) && !$isNewRecord;
@@ -6412,4 +6412,4 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tceforms.php']);
 }
 
-?>
\ No newline at end of file
+?>
index 8dae860..390e180 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]);
                                        }
@@ -2531,4 +2531,4 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tceforms_inline.php']);
 }
 
-?>
\ No newline at end of file
+?>
index b722264..ca7a7ab 100644 (file)
@@ -1250,7 +1250,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);
@@ -7827,4 +7827,4 @@ if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class
        include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_tcemain.php']);
 }
 
-?>
\ No newline at end of file
+?>