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:30 +0000 (17:34 +0000)
committerSteffen Kamper <info@sk-typo3.de>
Wed, 3 Nov 2010 17:34:30 +0000 (17:34 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-3@9256 709f56b5-9817-0410-a4d7-c38de5d9e867

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

index bfdce1a..7212078 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-10-29  Christian Kuhn  <lolli@schwarzbu.ch>
 
        * Fixed bug #15551: [IRRE] Open all child records when opening parent records (Thanks to Sebastian Fischer)
index 172ed0e..1a68505 100644 (file)
@@ -1516,7 +1516,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]);
                                }
@@ -3941,7 +3941,7 @@ class t3lib_TCEforms      {
                                                                                <td>'.
                                                                                        $colorBoxLinks[0].'<img '.
                                                                                        t3lib_iconWorks::skinImg($this->backPath,
-                                                                                                                               (strlen(trim($color))==0 || strcmp(trim($color),'0')==0) ? 'gfx/colorpicker_empty.png' : 'gfx/colorpicker.png', 
+                                                                                                                               (strlen(trim($color))==0 || strcmp(trim($color),'0')==0) ? 'gfx/colorpicker_empty.png' : 'gfx/colorpicker.png',
                                                                                                                                'width="'.$dX.'" height="'.$dY.'"'.t3lib_BEfunc::titleAltAttrib(trim($iTitle.' '.$PA['itemFormElValue'])).' border="0"').
                                                                                        '>'.$colorBoxLinks[1].
                                                                                        '</td>
@@ -6000,7 +6000,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;
index 9a0d028..7be1465 100644 (file)
@@ -1533,7 +1533,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]);
                                        }
@@ -2441,4 +2441,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 2bf3ba7..e8fae3a 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);