0005069.patch

Administrator Admin, 2007-02-25 15:02

Download (2.43 KB)

View differences:

t3lib/class.t3lib_tceforms_inline.php (Arbeitskopie)
454 454
			t3lib_BEfunc::readPageAccess($rec['pid'], $GLOBALS['BE_USER']->getPagePermsClause(1))
455 455
		);
456 456

  
457
			// FIXME: Put these calls somewhere else... possibly they arn't needed here
458
		$web_list_modTSconfig = t3lib_BEfunc::getModTSconfig($rec['pid'],'mod.web_list');
459
		$allowedNewTables = t3lib_div::trimExplode(',',$this->fObj->web_list_modTSconfig['properties']['allowedNewTables'],1);
460
		$showNewRecLink = !count($allowedNewTables) || in_array($foreign_table, $allowedNewTables);
461

  
462 457
			// If the listed table is 'pages' we have to request the permission settings for each page:
463 458
		if ($isPagesTable)	{
464 459
			$localCalcPerms = $GLOBALS['BE_USER']->calcPerms(t3lib_BEfunc::getRecord('pages',$rec['uid']));
......
482 477
					(!$isPagesTable && ($calcPerms&16)) || 	// For NON-pages, must have permission to edit content on this parent page
483 478
					($isPagesTable && ($calcPerms&8))		// For pages, must have permission to create new pages here.
484 479
					)	{
485
					if ($showNewRecLink)	{
486
						$onClick = "return inline.createNewRecord('".$nameObjectFt."','".$rec['uid']."')";
487
						if ($config['inline']['inlineNewButtonStyle']) $style = ' style="'.$config['inline']['inlineNewButtonStyle'].'"';
488
						$cells[]='<a href="#" onclick="'.htmlspecialchars($onClick).'" class="inlineNewButton"'.$style.'>'.
489
								'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_'.($isPagesTable?'page':'el').'.gif','width="'.($isPagesTable?13:11).'" height="12"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:new'.($isPagesTable?'Page':'Record'),1).'" alt="" />'.
490
								'</a>';
480
					$onClick = "return inline.createNewRecord('".$nameObjectFt."','".$rec['uid']."')";
481
					if ($config['inline']['inlineNewButtonStyle']) {
482
						$style = ' style="'.$config['inline']['inlineNewButtonStyle'].'"';
491 483
					}
484
					$cells[]='<a href="#" onclick="'.htmlspecialchars($onClick).'" class="inlineNewButton"'.$style.'>'.
485
							'<img'.t3lib_iconWorks::skinImg($this->backPath,'gfx/new_'.($isPagesTable?'page':'el').'.gif','width="'.($isPagesTable?13:11).'" height="12"').' title="'.$GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_mod_web_list.xml:new'.($isPagesTable?'Page':'Record'),1).'" alt="" />'.
486
							'</a>';
492 487
				}
493 488
			}
494 489