db_new_content_el_2.php.diff

Administrator Admin, 2006-03-20 16:59

Download (1.37 KB)

View differences:

typo3_src-4.0rc1/typo3/sysext/cms/layout/db_new_content_el.php 2006-03-20 16:51:07.000000000 +0100
552 552
			// Load full table definition:
553 553
		t3lib_div::loadTCA('tt_content');
554 554

  
555
			// Get TCEFORM from TSconfig of current page
556
		$row = array('pid'=>$this->id);
557
		$TCEFORM_TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig('tt_content',$row);
558
		$removeItems = t3lib_div::trimExplode(',',$TCEFORM_TSconfig['CType']['removeItems'],1);
559
		
555 560
		$headersUsed = Array();
556 561
			// Traverse wizard items:
557 562
		foreach($wizardItems as $key => $cfg)	{
......
578 583
						$config = &$TCA['tt_content']['columns'][$fN]['config'];
579 584
						$authModeDeny = $config['type']=='select' && $config['authMode'] && !$GLOBALS['BE_USER']->checkAuthMode('tt_content',$fN,$fV,$config['authMode']);
580 585

  
581
						if ($authModeDeny)	{
586
						if ($authModeDeny || in_array($fV,$removeItems))	{
582 587
								// Remove element all together:
583 588
							unset($wizardItems[$key]);
584 589
							break;
......
595 600
			// remove headers without elements
596 601
		foreach ($wizardItems as $key => $cfg)	{
597 602
			$tmp = explode('_',$key);
598
			if (count($tmp) == 2 && !$tmp[1] && !in_array($tmp[0], $headersUsed))	{
603
			if ($tmp[0] && !$tmp[1] && !in_array($tmp[0], $headersUsed))	{
599 604
				unset($wizardItems[$key]);
600 605
			}
601 606
		}