Fixed bug #17150: Workspaces non-admin user cannot send to next stage (Thanks to...
[Packages/TYPO3.CMS.git] / t3lib / class.t3lib_frontendedit.php
1 <?php
2 /***************************************************************
3 * Copyright notice
4 *
5 * (c) 2008-2011 Jeff Segars <jeff@webempoweredchurch.org>
6 * (c) 2008-2011 David Slayback <dave@webempoweredchurch.org>
7 * All rights reserved
8 *
9 * This script is part of the TYPO3 project. The TYPO3 project is
10 * free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
14 *
15 * The GNU General Public License can be found at
16 * http://www.gnu.org/copyleft/gpl.html.
17 * A copy is found in the textfile GPL.txt and important notices to the license
18 * from the author is found in LICENSE.txt distributed with these scripts.
19 *
20 *
21 * This script is distributed in the hope that it will be useful,
22 * but WITHOUT ANY WARRANTY; without even the implied warranty of
23 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24 * GNU General Public License for more details.
25 *
26 * This copyright notice MUST APPEAR in all copies of the script!
27 ***************************************************************/
28 /**
29 * Controller class for frontend editing.
30 *
31 * $Id$
32 *
33 * @author Jeff Segars <jeff@webempoweredchurch.org>
34 * @author David Slayback <dave@webempoweredchurch.org>
35 * @package TYPO3
36 * @subpackage t3lib
37 */
38 class t3lib_frontendedit {
39 /**
40 * GET/POST parameters for the FE editing.
41 * Accessed as $GLOBALS['BE_USER']->frontendEdit->TSFE_EDIT, thus public
42 *
43 * @var array
44 */
45 public $TSFE_EDIT;
46
47 /**
48 * TCEmain object.
49 *
50 * @var t3lib_tcemain
51 */
52 protected $tce;
53
54 /**
55 * Initializes configuration options.
56 *
57 * @return void
58 */
59 public function initConfigOptions() {
60 $this->TSFE_EDIT = t3lib_div::_GP('TSFE_EDIT');
61
62 // Include classes for editing IF editing module in Admin Panel is open
63 if ($GLOBALS['BE_USER']->isFrontendEditingActive()) {
64 $GLOBALS['TSFE']->includeTCA();
65 if ($this->isEditAction()) {
66 $this->editAction();
67 }
68 }
69 }
70
71 /**
72 * Generates the "edit panels" which can be shown for a page or records on a page when the Admin Panel is enabled for a backend users surfing the frontend.
73 * With the "edit panel" the user will see buttons with links to editing, moving, hiding, deleting the element
74 * This function is used for the cObject EDITPANEL and the stdWrap property ".editPanel"
75 *
76 * @param string A content string containing the content related to the edit panel. For cObject "EDITPANEL" this is empty but not so for the stdWrap property. The edit panel is appended to this string and returned.
77 * @param array TypoScript configuration properties for the editPanel
78 * @param string The "table:uid" of the record being shown. If empty string then $this->currentRecord is used. For new records (set by $conf['newRecordFromTable']) it's auto-generated to "[tablename]:NEW"
79 * @param array Alternative data array to use. Default is $this->data
80 * @return string The input content string with the editPanel appended. This function returns only an edit panel appended to the content string if a backend user is logged in (and has the correct permissions). Otherwise the content string is directly returned.
81 * @link http://typo3.org/doc.0.html?&tx_extrepmgm_pi1[extUid]=270&tx_extrepmgm_pi1[tocEl]=375&cHash=7d8915d508
82 */
83 public function displayEditPanel($content, array $conf, $currentRecord, array $dataArray) {
84 if ($conf['newRecordFromTable']) {
85 $currentRecord = $conf['newRecordFromTable'] . ':NEW';
86 $conf['allow'] = 'new';
87 $checkEditAccessInternals = FALSE;
88 } else {
89 $checkEditAccessInternals = TRUE;
90 }
91
92 list($table, $uid) = explode(':', $currentRecord);
93
94 // Page ID for new records, 0 if not specified
95 $newRecordPid = intval($conf['newRecordInPid']);
96 if (!$conf['onlyCurrentPid'] || $dataArray['pid'] == $GLOBALS['TSFE']->id) {
97 if ($table == 'pages') {
98 $newUid = $uid;
99 } else {
100 if ($conf['newRecordFromTable']) {
101 $newUid = $GLOBALS['TSFE']->id;
102 if ($newRecordPid) {
103 $newUid = $newRecordPid;
104 }
105 } else {
106 $newUid = -1 * $uid;
107 }
108 }
109 }
110
111 if ($GLOBALS['TSFE']->displayEditIcons && $table && $this->allowedToEdit($table, $dataArray, $conf, $checkEditAccessInternals) && $this->allowedToEditLanguage($table, $dataArray)) {
112 $editClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['edit'];
113 if ($editClass) {
114 $edit = t3lib_div::getUserObj($editClass, FALSE);
115 if (is_object($edit)) {
116 $allowedActions = $this->getAllowedEditActions($table, $conf, $dataArray['pid']);
117 $content = $edit->editPanel($content, $conf, $currentRecord, $dataArray, $table, $allowedActions, $newUid, $this->getHiddenFields($dataArray));
118 }
119 }
120 }
121
122 return $content;
123 }
124
125 /**
126 * Adds an edit icon to the content string. The edit icon links to alt_doc.php with proper parameters for editing the table/fields of the context.
127 * This implements TYPO3 context sensitive editing facilities. Only backend users will have access (if properly configured as well).
128 *
129 * @param string The content to which the edit icons should be appended
130 * @param string The parameters defining which table and fields to edit. Syntax is [tablename]:[fieldname],[fieldname],[fieldname],... OR [fieldname],[fieldname],[fieldname],... (basically "[tablename]:" is optional, default table is the one of the "current record" used in the function). The fieldlist is sent as "&columnsOnly=" parameter to alt_doc.php
131 * @param array TypoScript properties for configuring the edit icons.
132 * @param string The "table:uid" of the record being shown. If empty string then $this->currentRecord is used. For new records (set by $conf['newRecordFromTable']) it's auto-generated to "[tablename]:NEW"
133 * @param array Alternative data array to use. Default is $this->data
134 * @param string Additional URL parameters for the link pointing to alt_doc.php
135 * @return string The input content string, possibly with edit icons added (not necessarily in the end but just after the last string of normal content.
136 */
137
138 public function displayEditIcons($content, $params, array $conf = array(), $currentRecord = '', array $dataArray = array(), $addUrlParamStr = '') {
139 // Check incoming params:
140 list($currentRecordTable, $currentRecordUID) = explode(':', $currentRecord);
141 list($fieldList, $table) = array_reverse(t3lib_div::trimExplode(':', $params, 1)); // Reverse the array because table is optional
142 if (!$table) {
143 $table = $currentRecordTable;
144 } elseif ($table != $currentRecordTable) {
145 return $content; // If the table is set as the first parameter, and does not match the table of the current record, then just return.
146 }
147
148 $editUid = $dataArray['_LOCALIZED_UID'] ? $dataArray['_LOCALIZED_UID'] : $currentRecordUID;
149
150 // Edit icons imply that the editing action is generally allowed, assuming page and content element permissions permit it.
151 if (!array_key_exists('allow', $conf)) {
152 $conf['allow'] = 'edit';
153 }
154
155 if ($GLOBALS['TSFE']->displayFieldEditIcons && $table && $this->allowedToEdit($table, $dataArray, $conf) && $fieldList && $this->allowedToEditLanguage($table, $dataArray)) {
156 $editClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['edit'];
157 if ($editClass) {
158 $edit = t3lib_div::getUserObj($editClass);
159 if (is_object($edit)) {
160 $content = $edit->editIcons($content, $params, $conf, $currentRecord, $dataArray, $addUrlParamStr, $table, $editUid, $fieldList);
161 }
162 }
163 }
164
165 return $content;
166 }
167
168 /*****************************************************
169 *
170 * Frontend Editing
171 *
172 ****************************************************/
173
174 /**
175 * Returns true if an edit-action is sent from the Admin Panel
176 *
177 * @return boolean
178 * @see index_ts.php
179 */
180 public function isEditAction() {
181 if (is_array($this->TSFE_EDIT)) {
182 if ($this->TSFE_EDIT['cancel']) {
183 unset($this->TSFE_EDIT['cmd']);
184 } else {
185 $cmd = (string) $this->TSFE_EDIT['cmd'];
186 if (($cmd != 'edit' || (is_array($this->TSFE_EDIT['data']) && ($this->TSFE_EDIT['doSave'] || $this->TSFE_EDIT['update'] || $this->TSFE_EDIT['update_close']))) && $cmd != 'new') {
187 // $cmd can be a command like "hide" or "move". If $cmd is "edit" or "new" it's an indication to show the formfields. But if data is sent with update-flag then $cmd = edit is accepted because edit may be sent because of .keepGoing flag.
188 return TRUE;
189 }
190 }
191 }
192 return FALSE;
193 }
194
195 /**
196 * Returns true if an edit form is shown on the page.
197 * Used from index_ts.php where a true return-value will result in classes etc. being included.
198 *
199 * @return boolean
200 * @see index_ts.php
201 */
202 public function isEditFormShown() {
203 if (is_array($this->TSFE_EDIT)) {
204 $cmd = (string) $this->TSFE_EDIT['cmd'];
205 if ($cmd == 'edit' || $cmd == 'new') {
206 return TRUE;
207 }
208 }
209 }
210
211 /**
212 * Management of the on-page frontend editing forms and edit panels.
213 * Basically taking in the data and commands and passes them on to the proper classes as they should be.
214 *
215 * @return void
216 * @throws UnexpectedValueException if TSFE_EDIT[cmd] is not a valid command
217 * @see index_ts.php
218 */
219 public function editAction() {
220 // Commands:
221 list($table, $uid) = explode(':', $this->TSFE_EDIT['record']);
222 $uid = intval($uid);
223 $cmd = $this->TSFE_EDIT['cmd'];
224
225 // Look for some TSFE_EDIT data that indicates we should save.
226 if (($this->TSFE_EDIT['doSave'] || $this->TSFE_EDIT['update'] || $this->TSFE_EDIT['update_close']) && is_array($this->TSFE_EDIT['data'])) {
227 $cmd = 'save';
228 }
229
230 if (($cmd == 'save') || ($cmd && $table && $uid && isset($GLOBALS['TCA'][$table]))) {
231 // Hook for defining custom editing actions. Naming is incorrect, but preserves compatibility.
232 if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['extEditAction'])) {
233 $_params = array();
234 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['extEditAction'] as $_funcRef) {
235 t3lib_div::callUserFunction($_funcRef, $_params, $this);
236 }
237 }
238
239 // Perform the requested editing command.
240 $cmdAction = 'do' . ucwords($cmd);
241 if (is_callable(array($this, $cmdAction))) {
242 $this->$cmdAction($table, $uid);
243 } else {
244 throw new UnexpectedValueException(
245 'The specified frontend edit command (' . $cmd . ') is not valid.',
246 1225818120
247 );
248 }
249 }
250 }
251
252 /**
253 * Hides a specific record.
254 *
255 * @param string The table name for the record to hide.
256 * @param integer The UID for the record to hide.
257 * @return void
258 */
259 public function doHide($table, $uid) {
260 $hideField = $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'];
261 if ($hideField) {
262 $recData = array();
263 $recData[$table][$uid][$hideField] = 1;
264
265 $this->initializeTceMain();
266 $this->tce->start($recData, array());
267 $this->tce->process_datamap();
268 }
269 }
270
271 /**
272 * Unhides (shows) a specific record.
273 *
274 * @param string The table name for the record to unhide.
275 * @param integer The UID for the record to unhide.
276 * @return void
277 */
278 public function doUnhide($table, $uid) {
279 $hideField = $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'];
280 if ($hideField) {
281 $recData = array();
282 $recData[$table][$uid][$hideField] = 0;
283
284 $this->initializeTceMain();
285 $this->tce->start($recData, array());
286 $this->tce->process_datamap();
287 }
288 }
289
290 /**
291 * Moves a record up.
292 *
293 * @param string The table name for the record to move.
294 * @param integer The UID for the record to hide.
295 * @return void
296 */
297 public function doUp($table, $uid) {
298 $this->move($table, $uid, 'up');
299 }
300
301 /**
302 * Moves a record down.
303 *
304 * @param string The table name for the record to move.
305 * @param integer The UID for the record to move.
306 * @return void
307 */
308 public function doDown($table, $uid) {
309 $this->move($table, $uid, 'down');
310 }
311
312 /**
313 * Moves a record after a given element. Used for drag.
314 *
315 * @param string The table name for the record to move.
316 * @param integer The UID for the record to move.
317 * @return void
318 */
319 public function doMoveAfter($table, $uid) {
320 $afterUID = $GLOBALS['BE_USER']->frontendEdit->TSFE_EDIT['moveAfter'];
321 $this->move($table, $uid, '', $afterUID);
322 }
323
324 /**
325 * Moves a record
326 *
327 * @param string The table name for the record to move.
328 * @param integer The UID for the record to move.
329 * @param string The direction to move, either 'up' or 'down'.
330 * @param integer The UID of record to move after. This is specified for dragging only.
331 * @return void
332 */
333 protected function move($table, $uid, $direction = '', $afterUID = 0) {
334 $cmdData = array();
335 $sortField = $GLOBALS['TCA'][$table]['ctrl']['sortby'];
336 if ($sortField) {
337 // Get self:
338 $fields = array_unique(t3lib_div::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields'] . ',uid,pid,' . $sortField, TRUE));
339 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(implode(',', $fields), $table, 'uid=' . $uid);
340 if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
341 // record before or after
342 if (($GLOBALS['BE_USER']->adminPanel instanceOf tslib_AdminPanel) && ($GLOBALS['BE_USER']->adminPanel->extGetFeAdminValue('preview'))) {
343 $ignore = array('starttime' => 1, 'endtime' => 1, 'disabled' => 1, 'fe_group' => 1);
344 }
345 $copyAfterFieldsQuery = '';
346 if ($GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields']) {
347 $cAFields = t3lib_div::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields'], TRUE);
348 foreach ($cAFields as $fieldName) {
349 $copyAfterFieldsQuery .= ' AND ' . $fieldName . '="' . $row[$fieldName] . '"';
350 }
351 }
352 if (!empty($direction)) {
353 if ($direction == 'up') {
354 $operator = '<';
355 $order = 'DESC';
356 } else {
357 $operator = '>';
358 $order = 'ASC';
359 }
360 $sortCheck = ' AND ' . $sortField . $operator . intval($row[$sortField]);
361 }
362 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
363 'uid,pid',
364 $table,
365 'pid=' . intval($row['pid']) .
366 $sortCheck .
367 $copyAfterFieldsQuery .
368 $GLOBALS['TSFE']->sys_page->enableFields($table, '', $ignore),
369 '',
370 $sortField . ' ' . $order,
371 '2'
372 );
373 if ($row2 = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
374 if ($afterUID) {
375 $cmdData[$table][$uid]['move'] = -$afterUID;
376 }
377 elseif ($direction == 'down') {
378 $cmdData[$table][$uid]['move'] = -$row2['uid'];
379 }
380 elseif ($row3 = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { // Must take the second record above...
381 $cmdData[$table][$uid]['move'] = -$row3['uid'];
382 }
383 else { // ... and if that does not exist, use pid
384 $cmdData[$table][$uid]['move'] = $row['pid'];
385 }
386 } elseif ($direction == 'up') {
387 $cmdData[$table][$uid]['move'] = $row['pid'];
388 }
389 }
390 if (!empty($cmdData)) {
391 $this->initializeTceMain();
392 $this->tce->start(array(), $cmdData);
393 $this->tce->process_cmdmap();
394 }
395 }
396 }
397
398 /**
399 * Deletes a specific record.
400 *
401 * @param string The table name for the record to delete.
402 * @param integer The UID for the record to delete.
403 * @return void
404 */
405 public function doDelete($table, $uid) {
406 $cmdData[$table][$uid]['delete'] = 1;
407 if (count($cmdData)) {
408 $this->initializeTceMain();
409 $this->tce->start(array(), $cmdData);
410 $this->tce->process_cmdmap();
411 }
412 }
413
414 /**
415 * Saves a record based on its data array.
416 *
417 * @param string The table name for the record to save.
418 * @param integer The UID for the record to save.
419 * @return void
420 */
421 public function doSave($table, $uid) {
422 $data = $this->TSFE_EDIT['data'];
423
424 if (!empty($data)) {
425 $this->initializeTceMain();
426 $this->tce->start($data, array());
427 $this->tce->process_uploads($_FILES);
428 $this->tce->process_datamap();
429
430 // Save the new UID back into TSFE_EDIT
431 $newUID = $this->tce->substNEWwithIDs['NEW'];
432 if ($newUID) {
433 $GLOBALS['BE_USER']->frontendEdit->TSFE_EDIT['newUID'] = $newUID;
434 }
435 }
436 }
437
438 /**
439 * Saves a record based on its data array and closes it.
440 *
441 * @param string The table name for the record to save.
442 * @param integer The UID for the record to save.
443 * @return void
444 * @note This method is only a wrapper for doSave() but is needed so
445 * that frontend editing views can handle "save" differently from
446 * "save and close".
447 * Example: When editing a page record, "save" reloads the same
448 * editing form. "Save and close" reloads the entire page at
449 * the appropriate URL.
450 */
451 public function doSaveAndClose($table, $uid) {
452 $this->doSave($table, $uid);
453 }
454
455
456 /**
457 * Stub for closing a record. No real functionality needed since content
458 * element rendering will take care of everything.
459 *
460 * @param string The table name for the record to close.
461 * @param integer The UID for the record to close.
462 * @return void
463 */
464 public function doClose($table, $uid) {
465 // Do nothing.
466 }
467
468 /**
469 * Checks whether the user has access to edit the language for the
470 * requested record.
471 *
472 * @param string The name of the table.
473 * @param array The record.
474 * @return boolean
475 */
476 protected function allowedToEditLanguage($table, array $currentRecord) {
477 // If no access right to record languages, return immediately
478 if ($table === 'pages') {
479 $lang = $GLOBALS['TSFE']->sys_language_uid;
480 } elseif ($table === 'tt_content') {
481 $lang = $GLOBALS['TSFE']->sys_language_content;
482 } elseif ($GLOBALS['TCA'][$table]['ctrl']['languageField']) {
483 $lang = $currentRecord[$GLOBALS['TCA'][$table]['ctrl']['languageField']];
484 } else {
485 $lang = -1;
486 }
487
488 if ($GLOBALS['BE_USER']->checkLanguageAccess($lang)) {
489 $languageAccess = TRUE;
490 } else {
491 $languageAccess = FALSE;
492 }
493
494 return $languageAccess;
495 }
496
497 /**
498 * Checks whether the user is allowed to edit the requested table.
499 *
500 * @param string The name of the table.
501 * @param array The data array.
502 * @param array The configuration array for the edit panel.
503 * @param boolean Boolean indicating whether recordEditAccessInternals should not be checked. Defaults
504 * to true but doesn't makes sense when creating new records on a page.
505 * @return boolean
506 */
507 protected function allowedToEdit($table, array $dataArray, array $conf, $checkEditAccessInternals = TRUE) {
508
509 // Unless permissions specifically allow it, editing is not allowed.
510 $mayEdit = FALSE;
511
512 if ($checkEditAccessInternals) {
513 $editAccessInternals = $GLOBALS['BE_USER']->recordEditAccessInternals($table, $dataArray, FALSE, FALSE);
514 } else {
515 $editAccessInternals = TRUE;
516 }
517
518 if ($editAccessInternals) {
519 if ($table == 'pages') {
520 // 2 = permission to edit the page
521 if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->doesUserHaveAccess($dataArray, 2)) {
522 $mayEdit = TRUE;
523 }
524 } else {
525 // 16 = permission to edit content on the page
526 if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->doesUserHaveAccess(t3lib_BEfunc::getRecord('pages', $dataArray['pid']), 16)) {
527 $mayEdit = TRUE;
528 }
529 }
530
531 if (!$conf['onlyCurrentPid'] || ($dataArray['pid'] == $GLOBALS['TSFE']->id)) {
532 // Permissions:
533 $types = t3lib_div::trimExplode(',', t3lib_div::strtolower($conf['allow']), 1);
534 $allow = array_flip($types);
535
536 $perms = $GLOBALS['BE_USER']->calcPerms($GLOBALS['TSFE']->page);
537 if ($table == 'pages') {
538 $allow = $this->getAllowedEditActions($table, $conf, $dataArray['pid'], $allow);
539
540 // Can only display editbox if there are options in the menu
541 if (count($allow)) {
542 $mayEdit = TRUE;
543 }
544 } else {
545 $mayEdit = count($allow) && ($perms & 16);
546 }
547 }
548 }
549
550 return $mayEdit;
551 }
552
553 /**
554 * Takes an array of generally allowed actions and filters that list based on page and content permissions.
555 *
556 * @param string The name of the table.
557 * @param array The configuration array.
558 * @param integer The PID where editing will occur.
559 * @param string Comma-separated list of actions that are allowed in general.
560 * @return array
561 */
562 protected function getAllowedEditActions($table, array $conf, $pid, $allow = '') {
563
564 if (!$allow) {
565 $types = t3lib_div::trimExplode(',', t3lib_div::strtolower($conf['allow']), TRUE);
566 $allow = array_flip($types);
567 }
568
569 if (!$conf['onlyCurrentPid'] || $pid == $GLOBALS['TSFE']->id) {
570 // Permissions:
571 $types = t3lib_div::trimExplode(',', t3lib_div::strtolower($conf['allow']), TRUE);
572 $allow = array_flip($types);
573
574 $perms = $GLOBALS['BE_USER']->calcPerms($GLOBALS['TSFE']->page);
575 if ($table == 'pages') {
576 // rootpage!
577 if (count($GLOBALS['TSFE']->config['rootLine']) == 1) {
578 unset($allow['move']);
579 unset($allow['hide']);
580 unset($allow['delete']);
581 }
582 if (!($perms & 2)) {
583 unset($allow['edit']);
584 unset($allow['move']);
585 unset($allow['hide']);
586 }
587 if (!($perms & 4)) {
588 unset($allow['delete']);
589 }
590 if (!($perms & 8)) {
591 unset($allow['new']);
592 }
593 }
594 }
595
596 return $allow;
597 }
598
599 /**
600 * Adds any extra Javascript includes needed for Front-end editing
601 *
602 * @param none
603 * @return string
604 */
605 public function getJavascriptIncludes() {
606 // No extra JS includes needed
607 return '';
608 }
609
610 /**
611 * Gets the hidden fields (array key=field name, value=field value) to be used in the edit panel for a particular content element.
612 * In the normal case, no hidden fields are needed but special controllers such as TemplaVoila need to track flexform pointers, etc.
613 *
614 * @param array The data array for a specific content element.
615 * @return array
616 */
617 public function getHiddenFields(array $dataArray) {
618 // No special hidden fields needed.
619 return array();
620 }
621
622 /**
623 * Initializes t3lib_TCEmain since it is used on modification actions.
624 *
625 * @return void
626 */
627 protected function initializeTceMain() {
628 if (!isset($this->tce)) {
629 $this->tce = t3lib_div::makeInstance('t3lib_TCEmain');
630 $this->tce->stripslashes_values = 0;
631 }
632 }
633 }
634
635 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_frontendedit.php'])) {
636 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_frontendedit.php']);
637 }
638
639 ?>