* Fixed bug; All page types (doktype) was shown to uses even if they were not all...
authorKasper Skårhøj <kasper@typo3.org>
Sat, 29 May 2004 12:28:18 +0000 (12:28 +0000)
committerKasper Skårhøj <kasper@typo3.org>
Sat, 29 May 2004 12:28:18 +0000 (12:28 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@333 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_tceforms.php

index ffa8d21..0cfa7da 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2004-05-29  Kasper Skårhøj,,,  <kasper@typo3.com>
 
+       * Fixed bug; All page types (doktype) was shown to uses even if they were not all in their list of possible type values.
+
+2004-05-29  Kasper Skårhøj,,,  <kasper@typo3.com>
+
        * Created a new DEFAULT backend module called "manual". It shows a TOC of CSH items from the system. This will provide a "user sensitive" manual inside of TYPO3 with localized content to the extend that translators has translated CSH labels in the system. The vision is that the Documentation Team will develop CSH content so far that this will become a really good inline reference for users of TYPO3. Also, extension authors are encouraged to implement CSH for their tables and backend modules and let that be the user manual for their products!
 
 2004-05-28  Kasper Skårhøj,,,  <kasper@typo3.com>
index 5987005..ab9518e 100755 (executable)
@@ -1084,13 +1084,20 @@ class t3lib_TCEforms    {
                if ($config['itemsProcFunc']) $selItems = $this->procItems($selItems,$PA['fieldTSConfig']['itemsProcFunc.'],$config,$table,$row,$field);
 
                        // Possibly remove some items:
-               $removeItems=t3lib_div::trimExplode(',',$PA['fieldTSConfig']['removeItems'],1);
+               $removeItems = t3lib_div::trimExplode(',',$PA['fieldTSConfig']['removeItems'],1);
                foreach($selItems as $tk => $p) {
                        if (in_array($p[1],$removeItems))       {
                                unset($selItems[$tk]);
                        } else if (isset($PA['fieldTSConfig']['altLabels.'][$p[1]])) {
                                $selItems[$tk][0]=$this->sL($PA['fieldTSConfig']['altLabels.'][$p[1]]);
                        }
+
+                               // Removing doktypes with no access:
+                       if ($table.'.'.$field == 'pages.doktype')       {
+                               if (!($GLOBALS['BE_USER']->isAdmin() || t3lib_div::inList($GLOBALS['BE_USER']->groupData['pagetypes_select'],$p[1])))   {
+                                       unset($selItems[$tk]);
+                               }
+                       }
                }
 
                        // Creating the label for the "No Matching Value" entry.