Fixed bug #10970: Validation issue: Missing </div> in typo3/sysext/cms/layout/db_new_...
[Packages/TYPO3.CMS.git] / typo3 / sysext / cms / layout / db_new_content_el.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 1999-2009 Kasper Skaarhoj (kasperYYYY@typo3.com)
6 * All rights reserved
7 *
8 * This script is part of the TYPO3 project. The TYPO3 project is
9 * free software; you can redistribute it and/or modify
10 * it under the terms of the GNU General Public License as published by
11 * the Free Software Foundation; either version 2 of the License, or
12 * (at your option) any later version.
13 *
14 * The GNU General Public License can be found at
15 * http://www.gnu.org/copyleft/gpl.html.
16 * A copy is found in the textfile GPL.txt and important notices to the license
17 * from the author is found in LICENSE.txt distributed with these scripts.
18 *
19 *
20 * This script is distributed in the hope that it will be useful,
21 * but WITHOUT ANY WARRANTY; without even the implied warranty of
22 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 * GNU General Public License for more details.
24 *
25 * This copyright notice MUST APPEAR in all copies of the script!
26 ***************************************************************/
27 /**
28 * New content elements wizard
29 * (Part of the 'cms' extension)
30 *
31 * $Id$
32 * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj
33 * XHTML compatible.
34 *
35 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
36 */
37 /**
38 * [CLASS/FUNCTION INDEX of SCRIPT]
39 *
40 *
41 *
42 * 101: class ext_posMap extends t3lib_positionMap
43 * 111: function wrapRecordTitle($str,$row)
44 * 125: function onClickInsertRecord($row,$vv,$moveUid,$pid,$sys_lang=0)
45 *
46 *
47 * 153: class SC_db_new_content_el
48 * 176: function init()
49 * 212: function main()
50 * 359: function printContent()
51 *
52 * SECTION: OTHER FUNCTIONS:
53 * 388: function getWizardItems()
54 * 398: function wizardArray()
55 * 549: function removeInvalidElements(&$wizardItems)
56 *
57 * TOTAL FUNCTIONS: 8
58 * (This index is automatically created/updated by the extension "extdeveval")
59 *
60 */
61
62
63 unset($MCONF);
64 require('conf.php');
65 require($BACK_PATH.'init.php');
66 require($BACK_PATH.'template.php');
67
68 // Unset MCONF/MLANG since all we wanted was back path etc. for this particular script.
69 unset($MCONF);
70 unset($MLANG);
71
72 // Merging locallang files/arrays:
73 $LANG->includeLLFile('EXT:lang/locallang_misc.xml');
74 $LOCAL_LANG_orig = $LOCAL_LANG;
75 $LANG->includeLLFile('EXT:cms/layout/locallang_db_new_content_el.xml');
76 $LOCAL_LANG = t3lib_div::array_merge_recursive_overrule($LOCAL_LANG_orig,$LOCAL_LANG);
77
78 // Exits if 'cms' extension is not loaded:
79 t3lib_extMgm::isLoaded('cms',1);
80
81 // Include needed libraries:
82 require_once(PATH_t3lib.'class.t3lib_page.php');
83 require_once(PATH_t3lib.'class.t3lib_positionmap.php');
84
85
86
87
88
89
90
91
92
93
94 /**
95 * Local position map class
96 *
97 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
98 * @package TYPO3
99 * @subpackage core
100 */
101 class ext_posMap extends t3lib_positionMap {
102 var $dontPrintPageInsertIcons = 1;
103
104 /**
105 * Wrapping the title of the record - here we just return it.
106 *
107 * @param string The title value.
108 * @param array The record row.
109 * @return string Wrapped title string.
110 */
111 function wrapRecordTitle($str,$row) {
112 return $str;
113 }
114
115 /**
116 * Create on-click event value.
117 *
118 * @param array The record.
119 * @param string Column position value.
120 * @param integer Move uid
121 * @param integer PID value.
122 * @param integer System language
123 * @return string
124 */
125 function onClickInsertRecord($row,$vv,$moveUid,$pid,$sys_lang=0) {
126 $table='tt_content';
127
128 $location=$this->backPath.'alt_doc.php?edit[tt_content]['.(is_array($row)?-$row['uid']:$pid).']=new&defVals[tt_content][colPos]='.$vv.'&defVals[tt_content][sys_language_uid]='.$sys_lang.'&returnUrl='.rawurlencode($GLOBALS['SOBE']->R_URI);
129
130 return 'window.location.href=\''.$location.'\'+document.editForm.defValues.value; return false;';
131 }
132 }
133
134
135
136
137
138
139
140
141
142
143
144
145
146 /**
147 * Script Class for the New Content element wizard
148 *
149 * @author Kasper Skaarhoj <kasperYYYY@typo3.com>
150 * @package TYPO3
151 * @subpackage core
152 */
153 class SC_db_new_content_el {
154
155 // Internal, static (from GPvars):
156 var $id; // Page id
157 var $sys_language=0; // Sys language
158 var $R_URI=''; // Return URL.
159 var $colPos; // If set, the content is destined for a specific column.
160 var $uid_pid; //
161
162 // Internal, static:
163 var $modTSconfig=array(); // Module TSconfig.
164
165 /**
166 * Internal backend template object
167 *
168 * @var mediumDoc
169 */
170 var $doc;
171
172 // Internal, dynamic:
173 var $include_once = array(); // Includes a list of files to include between init() and main() - see init()
174 var $content; // Used to accumulate the content of the module.
175 var $access; // Access boolean.
176 var $config; // config of the wizard
177
178
179 /**
180 * Constructor, initializing internal variables.
181 *
182 * @return void
183 */
184 function init() {
185 global $BE_USER,$BACK_PATH,$TBE_MODULES_EXT;
186
187 // Setting class files to include:
188 if (is_array($TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses'])) {
189 $this->include_once = array_merge($this->include_once,$TBE_MODULES_EXT['xMOD_db_new_content_el']['addElClasses']);
190 }
191
192 // Setting internal vars:
193 $this->id = intval(t3lib_div::_GP('id'));
194 $this->sys_language = intval(t3lib_div::_GP('sys_language_uid'));
195 $this->R_URI = t3lib_div::_GP('returnUrl');
196 $this->colPos = t3lib_div::_GP('colPos');
197 $this->uid_pid = intval(t3lib_div::_GP('uid_pid'));
198
199 $this->MCONF['name'] = 'xMOD_db_new_content_el';
200 $this->modTSconfig = t3lib_BEfunc::getModTSconfig($this->id, 'mod.wizards.newContentElement');
201
202 $config = t3lib_BEfunc::getPagesTSconfig($this->id);
203 $this->config = $config['mod.']['wizards.']['newContentElement.'];
204
205 // Starting the document template object:
206 $this->doc = t3lib_div::makeInstance('template');
207 $this->doc->backPath = $BACK_PATH;
208 $this->doc->setModuleTemplate('templates/db_new_content_el.html');
209 $this->doc->JScode='';
210 $this->doc->JScodeLibArray['dyntabmenu'] = $this->doc->getDynTabMenuJScode();
211 $this->doc->form='<form action="" name="editForm"><input type="hidden" name="defValues" value="" />';
212
213 // Setting up the context sensitive menu:
214 $this->doc->getContextMenuCode();
215
216 // Getting the current page and receiving access information (used in main())
217 $perms_clause = $BE_USER->getPagePermsClause(1);
218 $this->pageinfo = t3lib_BEfunc::readPageAccess($this->id,$perms_clause);
219 $this->access = is_array($this->pageinfo) ? 1 : 0;
220 }
221
222 /**
223 * Creating the module output.
224 *
225 * @return void
226 */
227 function main() {
228 global $LANG,$BACK_PATH;
229
230
231 if ($this->id && $this->access) {
232
233 // Init position map object:
234 $posMap = t3lib_div::makeInstance('ext_posMap');
235 $posMap->cur_sys_language = $this->sys_language;
236 $posMap->backPath = $BACK_PATH;
237
238 if ((string)$this->colPos!='') { // If a column is pre-set:
239 if ($this->uid_pid<0) {
240 $row=array();
241 $row['uid']=abs($this->uid_pid);
242 } else {
243 $row='';
244 }
245 $this->onClickEvent = $posMap->onClickInsertRecord($row, $this->colPos, '', $this->uid_pid, $this->sys_language);
246 } else {
247 $this->onClickEvent = '';
248 }
249
250
251 // ***************************
252 // Creating content
253 // ***************************
254 // use a wrapper div
255 $this->content .= '<div id="user-setup-wrapper">';
256 $this->content.=$this->doc->header($LANG->getLL('newContentElement'));
257 $this->content.=$this->doc->spacer(5);
258
259 // Wizard
260 $code='';
261 $wizardItems = $this->getWizardItems();
262
263 // Wrapper for wizards
264 $this->elementWrapper['sectionHeader'] = array('<h3 class="bgColor5">', '</h3>');
265 $this->elementWrapper['section'] = array('<table border="0" cellpadding="1" cellspacing="2">', '</table>');
266 $this->elementWrapper['wizard'] = array('<tr>', '</tr>');
267 $this->elementWrapper['wizardPart'] = array('<td>', '</td>');
268 // copy wrapper for tabs
269 $this->elementWrapperForTabs = $this->elementWrapper;
270
271
272 // Hook for manipulating wizardItems, wrapper, onClickEvent etc.
273 if(is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'])) {
274 foreach($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['cms']['db_new_content_el']['wizardItemsHook'] as $classData) {
275 $hookObject = &t3lib_div::getUserObj($classData);
276
277 if(!($hookObject instanceof cms_newContentElementWizardsHook)) {
278 throw new UnexpectedValueException('$hookObject must implement interface cms_newContentElementWizardItemsHook', 1227834741);
279 }
280
281 $hookObject->manipulateWizardItems($wizardItems, $this);
282 }
283 }
284
285 if ($this->config['renderMode'] == 'tabs' && $this->elementWrapperForTabs != $this->elementWrapper) {
286 // restore wrapper for tabs if they are overwritten in hook
287 $this->elementWrapper = $this->elementWrapperForTabs;
288 }
289
290 // add document inline javascript
291 $this->doc->JScode = $this->doc->wrapScriptTags('
292 function goToalt_doc() { //
293 ' . $this->onClickEvent . '
294 }
295
296 if(top.refreshMenu) {
297 top.refreshMenu();
298 } else {
299 top.TYPO3ModuleMenu.refreshMenu();
300 }
301
302 if(top.shortcutFrame) {
303 top.shortcutFrame.refreshShortcuts();
304 }
305 ');
306
307 // Traverse items for the wizard.
308 // An item is either a header or an item rendered with a radio button and title/description and icon:
309 $cc = $key = 0;
310 $menuItems = array();
311 foreach ($wizardItems as $k => $wInfo) {
312 if ($wInfo['header']) {
313 $menuItems[] = array(
314 'label' => htmlspecialchars($wInfo['header']),
315 'content' => $this->elementWrapper['section'][0]
316 );
317 $key = count($menuItems) - 1;
318 } else {
319 $content = '';
320 // Radio button:
321 $oC = "document.editForm.defValues.value=unescape('".rawurlencode($wInfo['params'])."');goToalt_doc();".(!$this->onClickEvent?"window.location.hash='#sel2';":'');
322 $content .= $this->elementWrapper['wizardPart'][0] .
323 '<input type="radio" name="tempB" value="' . htmlspecialchars($k) . '" onclick="' . htmlspecialchars($this->doc->thisBlur().$oC) . '" />' .
324 $this->elementWrapper['wizardPart'][1];
325
326 // Onclick action for icon/title:
327 $aOnClick = 'document.getElementsByName(\'tempB\')['.$cc.'].checked=1;'.$this->doc->thisBlur().$oC.'return false;';
328
329 // Icon:
330 $iInfo = @getimagesize($wInfo['icon']);
331 $content .= $this->elementWrapper['wizardPart'][0] .
332 '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '">
333 <img' . t3lib_iconWorks::skinImg($this->doc->backPath, $wInfo['icon'], '') . ' alt="" /></a>' .
334 $this->elementWrapper['wizardPart'][1];
335
336 // Title + description:
337 $content .= $this->elementWrapper['wizardPart'][0] .
338 '<a href="#" onclick="' . htmlspecialchars($aOnClick) . '"><strong>' . htmlspecialchars($wInfo['title']) . '</strong><br />' .
339 nl2br(htmlspecialchars(trim($wInfo['description']))) . '</a>' .
340 $this->elementWrapper['wizardPart'][1];
341
342 // Finally, put it together in a container:
343 $menuItems[$key]['content'] .= $this->elementWrapper['wizard'][0] . $content . $this->elementWrapper['wizard'][1];
344 $cc++;
345 }
346 }
347 // add closing section-tag
348 foreach ($menuItems as $key => $val) {
349 $menuItems[$key]['content'] .= $this->elementWrapper['section'][1];
350 }
351
352
353
354 // Add the wizard table to the content, wrapped in tabs:
355 if ($this->config['renderMode'] == 'tabs') {
356 $this->doc->inDocStylesArray[] = '
357 .typo3-dyntabmenu-divs { background-color: #fafafa; border: 1px solid #000; width: 680px; }
358 .typo3-dyntabmenu-divs table { margin: 15px; }
359 .typo3-dyntabmenu-divs table td { padding: 3px; }
360 ';
361 $code = $LANG->getLL('sel1',1) . '<br /><br />' . $this->doc->getDynTabMenu($menuItems, 'new-content-element-wizard', false, false, 100);
362 } else {
363 $code = $LANG->getLL('sel1',1) . '<br /><br />';
364 foreach ($menuItems as $section) {
365 $code .= $this->elementWrapper['sectionHeader'][0] . $section['label'] . $this->elementWrapper['sectionHeader'][1] . $section['content'];
366 }
367 }
368
369 $this->content.= $this->doc->section(!$this->onClickEvent ? $LANG->getLL('1_selectType') : '', $code, 0, 1);
370
371
372
373 // If the user must also select a column:
374 if (!$this->onClickEvent) {
375
376 // Add anchor "sel2"
377 $this->content.= $this->doc->section('','<a name="sel2"></a>');
378 $this->content.= $this->doc->spacer(20);
379
380 // Select position
381 $code = $LANG->getLL('sel2',1).'<br /><br />';
382
383 // Load SHARED page-TSconfig settings and retrieve column list from there, if applicable:
384 $modTSconfig_SHARED = t3lib_BEfunc::getModTSconfig($this->id,'mod.SHARED');
385 $colPosList = strcmp(trim($modTSconfig_SHARED['properties']['colPos_list']),'') ? trim($modTSconfig_SHARED['properties']['colPos_list']) : '1,0,2,3';
386 $colPosList = implode(',',array_unique(t3lib_div::intExplode(',',$colPosList))); // Removing duplicates, if any
387
388 // Finally, add the content of the column selector to the content:
389 $code.= $posMap->printContentElementColumns($this->id,0,$colPosList,1,$this->R_URI);
390 $this->content.= $this->doc->section($LANG->getLL('2_selectPosition'),$code,0,1);
391 }
392 } else { // In case of no access:
393 $this->content = '';
394 $this->content.= $this->doc->header($LANG->getLL('newContentElement'));
395 $this->content.= $this->doc->spacer(5);
396 }
397
398 // Setting up the buttons and markers for docheader
399 $docHeaderButtons = $this->getButtons();
400 $markers['CSH'] = $docHeaderButtons['csh'];
401 $markers['CONTENT'] = $this->content;
402
403 // Build the <body> for the module
404 $this->content = $this->doc->startPage($LANG->getLL('newContentElement'));
405 $this->content.= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
406 $this->content .= $this->doc->sectionEnd();
407 $this->content.= $this->doc->endPage();
408 $this->content = $this->doc->insertStylesAndJS($this->content);
409 }
410
411 /**
412 * Print out the accumulated content:
413 *
414 * @return void
415 */
416 function printContent() {
417 echo $this->content;
418 }
419
420 /**
421 * Create the panel of buttons for submitting the form or otherwise perform operations.
422 *
423 * @return array all available buttons as an assoc. array
424 */
425 protected function getButtons() {
426 global $LANG, $BACK_PATH;
427
428 $buttons = array(
429 'csh' => '',
430 'back' => ''
431 );
432
433
434 if ($this->id && $this->access) {
435 // CSH
436 $buttons['csh'] = t3lib_BEfunc::cshItem('xMOD_csh_corebe', 'new_ce', $GLOBALS['BACK_PATH'], '', TRUE);
437
438 // Back
439 if ($this->R_URI) {
440 $buttons['back'] = '<a href="' . htmlspecialchars($this->R_URI) . '" class="typo3-goBack">' .
441 '<img' . t3lib_iconWorks::skinImg($this->doc->backPath, 'gfx/goback.gif') . ' alt="" title="' . $LANG->getLL('goBack', 1) . '" />' .
442 '</a>';
443 }
444 }
445
446
447 return $buttons;
448 }
449
450
451
452
453
454
455
456
457
458 /***************************
459 *
460 * OTHER FUNCTIONS:
461 *
462 ***************************/
463
464
465 /**
466 * Returns the content of wizardArray() function...
467 *
468 * @return array Returns the content of wizardArray() function...
469 */
470 function getWizardItems() {
471 return $this->wizardArray();
472 }
473
474 /**
475 * Returns the array of elements in the wizard display.
476 * For the plugin section there is support for adding elements there from a global variable.
477 *
478 * @return array
479 */
480 function wizardArray() {
481
482 if (is_array($this->config)) {
483 $wizards = $this->config['wizardItems.'];
484 }
485 $appendWizards = $this->wizard_appendWizards($wizards['elements.']);
486
487 $wizardItems = array();
488
489 if (is_array($wizards)) {
490 foreach ($wizards as $groupKey => $wizardGroup) {
491 $groupKey = preg_replace('/\.$/', '', $groupKey);
492 $showItems = t3lib_div::trimExplode(',', $wizardGroup['show'], true);
493 $showAll = (strcmp($wizardGroup['show'], '*') ? false : true);
494 $groupItems = array();
495
496 if (is_array($appendWizards[$groupKey . '.']['elements.'])) {
497 $wizardElements = array_merge((array) $wizardGroup['elements.'], $appendWizards[$groupKey . '.']['elements.']);
498 } else {
499 $wizardElements = $wizardGroup['elements.'];
500 }
501
502 if (is_array($wizardElements)) {
503 foreach ($wizardElements as $itemKey => $itemConf) {
504 $itemKey = preg_replace('/\.$/', '', $itemKey);
505 if ($showAll || in_array($itemKey, $showItems)) {
506 $tmpItem = $this->wizard_getItem($groupKey, $itemKey, $itemConf);
507 if ($tmpItem) {
508 $groupItems[$groupKey . '_' . $itemKey] = $tmpItem;
509 }
510 }
511 }
512 }
513 if (count($groupItems)) {
514 $wizardItems[$groupKey] = $this->wizard_getGroupHeader($groupKey, $wizardGroup);
515 $wizardItems = array_merge($wizardItems, $groupItems);
516 }
517 }
518 }
519
520 // Remove elements where preset values are not allowed:
521 $this->removeInvalidElements($wizardItems);
522
523 return $wizardItems;
524 }
525
526 function wizard_appendWizards($wizardElements) {
527 if (!is_array($wizardElements)) {
528 $wizardElements = array();
529 }
530 if (is_array($GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses'])) {
531 foreach ($GLOBALS['TBE_MODULES_EXT']['xMOD_db_new_content_el']['addElClasses'] as $class => $path) {
532 require_once($path);
533 $modObj = t3lib_div::makeInstance($class);
534 $wizardElements = $modObj->proc($wizardElements);
535 }
536 }
537 $returnElements = array();
538 foreach ($wizardElements as $key => $wizardItem) {
539 preg_match('/^[a-zA-Z0-9]+_/', $key, $group);
540 $wizardGroup = $group[0] ? substr($group[0], 0, -1) . '.' : $key;
541 $returnElements[$wizardGroup]['elements.'][substr($key, strlen($wizardGroup)) . '.'] = $wizardItem;
542 }
543 return $returnElements;
544 }
545
546
547 function wizard_getItem($groupKey, $itemKey, $itemConf) {
548 $itemConf['title'] = $GLOBALS['LANG']->sL($itemConf['title']);
549 $itemConf['description'] = $GLOBALS['LANG']->sL($itemConf['description']);
550 $itemConf['tt_content_defValues'] = $itemConf['tt_content_defValues.'];
551 unset($itemConf['tt_content_defValues.']);
552 return $itemConf;
553 }
554
555 function wizard_getGroupHeader($groupKey, $wizardGroup) {
556 return array(
557 'header' => $GLOBALS['LANG']->sL($wizardGroup['header'])
558 );
559 }
560
561
562 /**
563 * Checks the array for elements which might contain unallowed default values and will unset them!
564 * Looks for the "tt_content_defValues" key in each element and if found it will traverse that array as fieldname / value pairs and check. The values will be added to the "params" key of the array (which should probably be unset or empty by default).
565 *
566 * @param array Wizard items, passed by reference
567 * @return void
568 */
569 function removeInvalidElements(&$wizardItems) {
570 global $TCA;
571
572 // Load full table definition:
573 t3lib_div::loadTCA('tt_content');
574
575 // Get TCEFORM from TSconfig of current page
576 $row = array('pid' => $this->id);
577 $TCEFORM_TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig('tt_content', $row);
578 $removeItems = t3lib_div::trimExplode(',', $TCEFORM_TSconfig['CType']['removeItems'], 1);
579 $keepItems = t3lib_div::trimExplode(',', $TCEFORM_TSconfig['CType']['keepItems'], 1);
580
581 $headersUsed = Array();
582 // Traverse wizard items:
583 foreach($wizardItems as $key => $cfg) {
584
585 // Exploding parameter string, if any (old style)
586 if ($wizardItems[$key]['params']) {
587 // Explode GET vars recursively
588 $tempGetVars = t3lib_div::explodeUrl2Array($wizardItems[$key]['params'],TRUE);
589 // If tt_content values are set, merge them into the tt_content_defValues array, unset them from $tempGetVars and re-implode $tempGetVars into the param string (in case remaining parameters are around).
590 if (is_array($tempGetVars['defVals']['tt_content'])) {
591 $wizardItems[$key]['tt_content_defValues'] = array_merge(is_array($wizardItems[$key]['tt_content_defValues']) ? $wizardItems[$key]['tt_content_defValues'] : array(), $tempGetVars['defVals']['tt_content']);
592 unset($tempGetVars['defVals']['tt_content']);
593 $wizardItems[$key]['params'] = t3lib_div::implodeArrayForUrl('',$tempGetVars);
594 }
595 }
596
597 // If tt_content_defValues are defined...:
598 if (is_array($wizardItems[$key]['tt_content_defValues'])) {
599
600 // Traverse field values:
601 foreach($wizardItems[$key]['tt_content_defValues'] as $fN => $fV) {
602 if (is_array($TCA['tt_content']['columns'][$fN])) {
603 // Get information about if the field value is OK:
604 $config = &$TCA['tt_content']['columns'][$fN]['config'];
605 $authModeDeny = ($config['type']=='select' && $config['authMode'] && !$GLOBALS['BE_USER']->checkAuthMode('tt_content', $fN, $fV, $config['authMode']));
606 $isNotInKeepItems = (count($keepItems) && !in_array($fV, $keepItems));
607
608 if ($authModeDeny || ($fN=='CType' && in_array($fV,$removeItems)) || $isNotInKeepItems) {
609 // Remove element all together:
610 unset($wizardItems[$key]);
611 break;
612 } else {
613 // Add the parameter:
614 $wizardItems[$key]['params'].= '&defVals[tt_content]['.$fN.']='.rawurlencode($fV);
615 $tmp = explode('_', $key);
616 $headersUsed[$tmp[0]] = $tmp[0];
617 }
618 }
619 }
620 }
621 }
622 // remove headers without elements
623 foreach ($wizardItems as $key => $cfg) {
624 $tmp = explode('_',$key);
625 if ($tmp[0] && !$tmp[1] && !in_array($tmp[0], $headersUsed)) {
626 unset($wizardItems[$key]);
627 }
628 }
629 }
630 }
631
632
633 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/cms/layout/db_new_content_el.php']) {
634 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/cms/layout/db_new_content_el.php']);
635 }
636
637
638
639 // Make instance:
640 $SOBE = t3lib_div::makeInstance('SC_db_new_content_el');
641 $SOBE->init();
642
643 // Include files?
644 foreach($SOBE->include_once as $INC_FILE) include_once($INC_FILE);
645
646 $SOBE->main();
647 $SOBE->printContent();
648
649 ?>