[TASK] Use simple file backend for core php cache
[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 * @author Jeff Segars <jeff@webempoweredchurch.org>
32 * @author David Slayback <dave@webempoweredchurch.org>
33 * @package TYPO3
34 * @subpackage t3lib
35 */
36 class t3lib_frontendedit {
37 /**
38 * GET/POST parameters for the FE editing.
39 * Accessed as $GLOBALS['BE_USER']->frontendEdit->TSFE_EDIT, thus public
40 *
41 * @var array
42 */
43 public $TSFE_EDIT;
44
45 /**
46 * TCEmain object.
47 *
48 * @var t3lib_tcemain
49 */
50 protected $tce;
51
52 /**
53 * Initializes configuration options.
54 *
55 * @return void
56 */
57 public function initConfigOptions() {
58 $this->TSFE_EDIT = t3lib_div::_GP('TSFE_EDIT');
59
60 // Include classes for editing IF editing module in Admin Panel is open
61 if ($GLOBALS['BE_USER']->isFrontendEditingActive()) {
62 $GLOBALS['TSFE']->includeTCA();
63 if ($this->isEditAction()) {
64 $this->editAction();
65 }
66 }
67 }
68
69 /**
70 * 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.
71 * With the "edit panel" the user will see buttons with links to editing, moving, hiding, deleting the element
72 * This function is used for the cObject EDITPANEL and the stdWrap property ".editPanel"
73 *
74 * @param string $content 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.
75 * @param array $conf TypoScript configuration properties for the editPanel
76 * @param string $currentRecord 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"
77 * @param array $dataArray Alternative data array to use. Default is $this->data
78 * @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.
79 */
80 public function displayEditPanel($content, array $conf, $currentRecord, array $dataArray) {
81 if ($conf['newRecordFromTable']) {
82 $currentRecord = $conf['newRecordFromTable'] . ':NEW';
83 $conf['allow'] = 'new';
84 $checkEditAccessInternals = FALSE;
85 } else {
86 $checkEditAccessInternals = TRUE;
87 }
88
89 list($table, $uid) = explode(':', $currentRecord);
90
91 // Page ID for new records, 0 if not specified
92 $newRecordPid = intval($conf['newRecordInPid']);
93 if (!$conf['onlyCurrentPid'] || $dataArray['pid'] == $GLOBALS['TSFE']->id) {
94 if ($table == 'pages') {
95 $newUid = $uid;
96 } else {
97 if ($conf['newRecordFromTable']) {
98 $newUid = $GLOBALS['TSFE']->id;
99 if ($newRecordPid) {
100 $newUid = $newRecordPid;
101 }
102 } else {
103 $newUid = -1 * $uid;
104 }
105 }
106 }
107
108 if ($GLOBALS['TSFE']->displayEditIcons && $table && $this->allowedToEdit($table, $dataArray, $conf, $checkEditAccessInternals) && $this->allowedToEditLanguage($table, $dataArray)) {
109 $editClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['edit'];
110 if ($editClass) {
111 $edit = t3lib_div::getUserObj($editClass, FALSE);
112 if (is_object($edit)) {
113 $allowedActions = $this->getAllowedEditActions($table, $conf, $dataArray['pid']);
114 $content = $edit->editPanel($content, $conf, $currentRecord, $dataArray, $table, $allowedActions, $newUid, $this->getHiddenFields($dataArray));
115 }
116 }
117 }
118
119 return $content;
120 }
121
122 /**
123 * 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.
124 * This implements TYPO3 context sensitive editing facilities. Only backend users will have access (if properly configured as well).
125 *
126 * @param string $content The content to which the edit icons should be appended
127 * @param string $params 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
128 * @param array $conf TypoScript properties for configuring the edit icons.
129 * @param string $currentRecord 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"
130 * @param array $dataArray Alternative data array to use. Default is $this->data
131 * @param string $addUrlParamStr Additional URL parameters for the link pointing to alt_doc.php
132 * @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.
133 */
134 public function displayEditIcons($content, $params, array $conf = array(), $currentRecord = '', array $dataArray = array(), $addUrlParamStr = '') {
135 // Check incoming params:
136 list($currentRecordTable, $currentRecordUID) = explode(':', $currentRecord);
137 list($fieldList, $table) = array_reverse(t3lib_div::trimExplode(':', $params, 1)); // Reverse the array because table is optional
138 if (!$table) {
139 $table = $currentRecordTable;
140 } elseif ($table != $currentRecordTable) {
141 // If the table is set as the first parameter, and does not match the table of the current record, then just return.
142 return $content;
143 }
144
145 $editUid = $dataArray['_LOCALIZED_UID'] ? $dataArray['_LOCALIZED_UID'] : $currentRecordUID;
146
147 // Edit icons imply that the editing action is generally allowed, assuming page and content element permissions permit it.
148 if (!array_key_exists('allow', $conf)) {
149 $conf['allow'] = 'edit';
150 }
151
152 if ($GLOBALS['TSFE']->displayFieldEditIcons && $table && $this->allowedToEdit($table, $dataArray, $conf) && $fieldList && $this->allowedToEditLanguage($table, $dataArray)) {
153 $editClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['edit'];
154 if ($editClass) {
155 $edit = t3lib_div::getUserObj($editClass);
156 if (is_object($edit)) {
157 $content = $edit->editIcons($content, $params, $conf, $currentRecord, $dataArray, $addUrlParamStr, $table, $editUid, $fieldList);
158 }
159 }
160 }
161
162 return $content;
163 }
164
165 /*****************************************************
166 *
167 * Frontend Editing
168 *
169 ****************************************************/
170
171 /**
172 * Returns TRUE if an edit-action is sent from the Admin Panel
173 *
174 * @return boolean
175 * @see index_ts.php
176 */
177 public function isEditAction() {
178 if (is_array($this->TSFE_EDIT)) {
179 if ($this->TSFE_EDIT['cancel']) {
180 unset($this->TSFE_EDIT['cmd']);
181 } else {
182 $cmd = (string) $this->TSFE_EDIT['cmd'];
183 if (($cmd != 'edit' || (is_array($this->TSFE_EDIT['data']) && ($this->TSFE_EDIT['doSave'] || $this->TSFE_EDIT['update'] || $this->TSFE_EDIT['update_close']))) && $cmd != 'new') {
184 // $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.
185 return TRUE;
186 }
187 }
188 }
189 return FALSE;
190 }
191
192 /**
193 * Returns TRUE if an edit form is shown on the page.
194 * Used from index_ts.php where a TRUE return-value will result in classes etc. being included.
195 *
196 * @return boolean
197 * @see index_ts.php
198 */
199 public function isEditFormShown() {
200 if (is_array($this->TSFE_EDIT)) {
201 $cmd = (string) $this->TSFE_EDIT['cmd'];
202 if ($cmd == 'edit' || $cmd == 'new') {
203 return TRUE;
204 }
205 }
206 }
207
208 /**
209 * Management of the on-page frontend editing forms and edit panels.
210 * Basically taking in the data and commands and passes them on to the proper classes as they should be.
211 *
212 * @return void
213 * @throws UnexpectedValueException if TSFE_EDIT[cmd] is not a valid command
214 * @see index_ts.php
215 */
216 public function editAction() {
217 // Commands
218 list($table, $uid) = explode(':', $this->TSFE_EDIT['record']);
219 $uid = intval($uid);
220 $cmd = $this->TSFE_EDIT['cmd'];
221
222 // Look for some TSFE_EDIT data that indicates we should save.
223 if (($this->TSFE_EDIT['doSave'] || $this->TSFE_EDIT['update'] || $this->TSFE_EDIT['update_close']) && is_array($this->TSFE_EDIT['data'])) {
224 $cmd = 'save';
225 }
226
227 if (($cmd == 'save') || ($cmd && $table && $uid && isset($GLOBALS['TCA'][$table]))) {
228 // Hook for defining custom editing actions. Naming is incorrect, but preserves compatibility.
229 if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['extEditAction'])) {
230 $_params = array();
231 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['extEditAction'] as $_funcRef) {
232 t3lib_div::callUserFunction($_funcRef, $_params, $this);
233 }
234 }
235
236 // Perform the requested editing command.
237 $cmdAction = 'do' . ucwords($cmd);
238 if (is_callable(array($this, $cmdAction))) {
239 $this->$cmdAction($table, $uid);
240 } else {
241 throw new UnexpectedValueException(
242 'The specified frontend edit command (' . $cmd . ') is not valid.',
243 1225818120
244 );
245 }
246 }
247 }
248
249 /**
250 * Hides a specific record.
251 *
252 * @param string $table The table name for the record to hide.
253 * @param integer $uid The UID for the record to hide.
254 * @return void
255 */
256 public function doHide($table, $uid) {
257 $hideField = $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'];
258 if ($hideField) {
259 $recData = array();
260 $recData[$table][$uid][$hideField] = 1;
261
262 $this->initializeTceMain();
263 $this->tce->start($recData, array());
264 $this->tce->process_datamap();
265 }
266 }
267
268 /**
269 * Unhides (shows) a specific record.
270 *
271 * @param string $table The table name for the record to unhide.
272 * @param integer $uid The UID for the record to unhide.
273 * @return void
274 */
275 public function doUnhide($table, $uid) {
276 $hideField = $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'];
277 if ($hideField) {
278 $recData = array();
279 $recData[$table][$uid][$hideField] = 0;
280
281 $this->initializeTceMain();
282 $this->tce->start($recData, array());
283 $this->tce->process_datamap();
284 }
285 }
286
287 /**
288 * Moves a record up.
289 *
290 * @param string $table The table name for the record to move.
291 * @param integer $uid The UID for the record to hide.
292 * @return void
293 */
294 public function doUp($table, $uid) {
295 $this->move($table, $uid, 'up');
296 }
297
298 /**
299 * Moves a record down.
300 *
301 * @param string $table The table name for the record to move.
302 * @param integer $uid The UID for the record to move.
303 * @return void
304 */
305 public function doDown($table, $uid) {
306 $this->move($table, $uid, 'down');
307 }
308
309 /**
310 * Moves a record after a given element. Used for drag.
311 *
312 * @param string $table The table name for the record to move.
313 * @param integer $uid The UID for the record to move.
314 * @return void
315 */
316 public function doMoveAfter($table, $uid) {
317 $afterUID = $GLOBALS['BE_USER']->frontendEdit->TSFE_EDIT['moveAfter'];
318 $this->move($table, $uid, '', $afterUID);
319 }
320
321 /**
322 * Moves a record
323 *
324 * @param string $table The table name for the record to move.
325 * @param integer $uid The UID for the record to move.
326 * @param string $direction The direction to move, either 'up' or 'down'.
327 * @param integer $afterUID The UID of record to move after. This is specified for dragging only.
328 * @return void
329 */
330 protected function move($table, $uid, $direction = '', $afterUID = 0) {
331 $cmdData = array();
332 $sortField = $GLOBALS['TCA'][$table]['ctrl']['sortby'];
333 if ($sortField) {
334 // Get self
335 $fields = array_unique(t3lib_div::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields'] . ',uid,pid,' . $sortField, TRUE));
336 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(implode(',', $fields), $table, 'uid=' . $uid);
337 if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
338 // Record before or after
339 if (($GLOBALS['BE_USER']->adminPanel instanceOf tslib_AdminPanel) && ($GLOBALS['BE_USER']->adminPanel->extGetFeAdminValue('preview'))) {
340 $ignore = array('starttime' => 1, 'endtime' => 1, 'disabled' => 1, 'fe_group' => 1);
341 }
342 $copyAfterFieldsQuery = '';
343 if ($GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields']) {
344 $cAFields = t3lib_div::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields'], TRUE);
345 foreach ($cAFields as $fieldName) {
346 $copyAfterFieldsQuery .= ' AND ' . $fieldName . '="' . $row[$fieldName] . '"';
347 }
348 }
349 if (!empty($direction)) {
350 if ($direction == 'up') {
351 $operator = '<';
352 $order = 'DESC';
353 } else {
354 $operator = '>';
355 $order = 'ASC';
356 }
357 $sortCheck = ' AND ' . $sortField . $operator . intval($row[$sortField]);
358 }
359 $GLOBALS['TYPO3_DB']->sql_free_result($res);
360 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
361 'uid,pid',
362 $table,
363 'pid=' . intval($row['pid']) .
364 $sortCheck .
365 $copyAfterFieldsQuery .
366 $GLOBALS['TSFE']->sys_page->enableFields($table, '', $ignore),
367 '',
368 $sortField . ' ' . $order,
369 '2'
370 );
371 if ($row2 = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
372 if ($afterUID) {
373 $cmdData[$table][$uid]['move'] = -$afterUID;
374 }
375 elseif ($direction == 'down') {
376 $cmdData[$table][$uid]['move'] = -$row2['uid'];
377 }
378 elseif ($row3 = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { // Must take the second record above...
379 $cmdData[$table][$uid]['move'] = -$row3['uid'];
380 }
381 else { // ... and if that does not exist, use pid
382 $cmdData[$table][$uid]['move'] = $row['pid'];
383 }
384 } elseif ($direction == 'up') {
385 $cmdData[$table][$uid]['move'] = $row['pid'];
386 }
387
388 $GLOBALS['TYPO3_DB']->sql_free_result($res);
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 $table The table name for the record to delete.
402 * @param integer $uid 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 $table The table name for the record to save.
418 * @param integer $uid 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 $table The table name for the record to save.
442 * @param integer $uid 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 * Stub for closing a record. No real functionality needed since content
457 * element rendering will take care of everything.
458 *
459 * @param string $table The table name for the record to close.
460 * @param integer $uid The UID for the record to close.
461 * @return void
462 */
463 public function doClose($table, $uid) {
464 // Do nothing.
465 }
466
467 /**
468 * Checks whether the user has access to edit the language for the
469 * requested record.
470 *
471 * @param string $table The name of the table.
472 * @param array $currentRecord The record.
473 * @return boolean
474 */
475 protected function allowedToEditLanguage($table, array $currentRecord) {
476 // If no access right to record languages, return immediately
477 if ($table === 'pages') {
478 $lang = $GLOBALS['TSFE']->sys_language_uid;
479 } elseif ($table === 'tt_content') {
480 $lang = $GLOBALS['TSFE']->sys_language_content;
481 } elseif ($GLOBALS['TCA'][$table]['ctrl']['languageField']) {
482 $lang = $currentRecord[$GLOBALS['TCA'][$table]['ctrl']['languageField']];
483 } else {
484 $lang = -1;
485 }
486
487 if ($GLOBALS['BE_USER']->checkLanguageAccess($lang)) {
488 $languageAccess = TRUE;
489 } else {
490 $languageAccess = FALSE;
491 }
492
493 return $languageAccess;
494 }
495
496 /**
497 * Checks whether the user is allowed to edit the requested table.
498 *
499 * @param string $table The name of the table.
500 * @param array $dataArray The data array.
501 * @param array $conf The configuration array for the edit panel.
502 * @param boolean $checkEditAccessInternals Boolean indicating whether recordEditAccessInternals should not be checked. Defaults
503 * to TRUE but doesn't makes sense when creating new records on a page.
504 * @return boolean
505 */
506 protected function allowedToEdit($table, array $dataArray, array $conf, $checkEditAccessInternals = TRUE) {
507
508 // Unless permissions specifically allow it, editing is not allowed.
509 $mayEdit = FALSE;
510
511 if ($checkEditAccessInternals) {
512 $editAccessInternals = $GLOBALS['BE_USER']->recordEditAccessInternals($table, $dataArray, FALSE, FALSE);
513 } else {
514 $editAccessInternals = TRUE;
515 }
516
517 if ($editAccessInternals) {
518 if ($table == 'pages') {
519 // 2 = permission to edit the page
520 if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->doesUserHaveAccess($dataArray, 2)) {
521 $mayEdit = TRUE;
522 }
523 } else {
524 // 16 = permission to edit content on the page
525 if ($GLOBALS['BE_USER']->isAdmin() || $GLOBALS['BE_USER']->doesUserHaveAccess(t3lib_BEfunc::getRecord('pages', $dataArray['pid']), 16)) {
526 $mayEdit = TRUE;
527 }
528 }
529
530 if (!$conf['onlyCurrentPid'] || ($dataArray['pid'] == $GLOBALS['TSFE']->id)) {
531 // Permissions:
532 $types = t3lib_div::trimExplode(',', t3lib_div::strtolower($conf['allow']), 1);
533 $allow = array_flip($types);
534
535 $perms = $GLOBALS['BE_USER']->calcPerms($GLOBALS['TSFE']->page);
536 if ($table == 'pages') {
537 $allow = $this->getAllowedEditActions($table, $conf, $dataArray['pid'], $allow);
538
539 // Can only display editbox if there are options in the menu
540 if (count($allow)) {
541 $mayEdit = TRUE;
542 }
543 } else {
544 $mayEdit = count($allow) && ($perms & 16);
545 }
546 }
547 }
548
549 return $mayEdit;
550 }
551
552 /**
553 * Takes an array of generally allowed actions and filters that list based on page and content permissions.
554 *
555 * @param string $table The name of the table.
556 * @param array $conf The configuration array.
557 * @param integer $pid The PID where editing will occur.
558 * @param string $allow Comma-separated list of actions that are allowed in general.
559 * @return array
560 */
561 protected function getAllowedEditActions($table, array $conf, $pid, $allow = '') {
562
563 if (!$allow) {
564 $types = t3lib_div::trimExplode(',', t3lib_div::strtolower($conf['allow']), TRUE);
565 $allow = array_flip($types);
566 }
567
568 if (!$conf['onlyCurrentPid'] || $pid == $GLOBALS['TSFE']->id) {
569 // Permissions
570 $types = t3lib_div::trimExplode(',', t3lib_div::strtolower($conf['allow']), TRUE);
571 $allow = array_flip($types);
572
573 $perms = $GLOBALS['BE_USER']->calcPerms($GLOBALS['TSFE']->page);
574 if ($table == 'pages') {
575 // Rootpage
576 if (count($GLOBALS['TSFE']->config['rootLine']) == 1) {
577 unset($allow['move']);
578 unset($allow['hide']);
579 unset($allow['delete']);
580 }
581 if (!($perms & 2)) {
582 unset($allow['edit']);
583 unset($allow['move']);
584 unset($allow['hide']);
585 }
586 if (!($perms & 4)) {
587 unset($allow['delete']);
588 }
589 if (!($perms & 8)) {
590 unset($allow['new']);
591 }
592 }
593 }
594
595 return $allow;
596 }
597
598 /**
599 * Adds any extra Javascript includes needed for Front-end editing
600 *
601 * @return string
602 */
603 public function getJavascriptIncludes() {
604 // No extra JS includes needed
605 return '';
606 }
607
608 /**
609 * Gets the hidden fields (array key=field name, value=field value) to be used in the edit panel for a particular content element.
610 * In the normal case, no hidden fields are needed but special controllers such as TemplaVoila need to track flexform pointers, etc.
611 *
612 * @param array $dataArray The data array for a specific content element.
613 * @return array
614 */
615 public function getHiddenFields(array $dataArray) {
616 // No special hidden fields needed.
617 return array();
618 }
619
620 /**
621 * Initializes t3lib_TCEmain since it is used on modification actions.
622 *
623 * @return void
624 */
625 protected function initializeTceMain() {
626 if (!isset($this->tce)) {
627 $this->tce = t3lib_div::makeInstance('t3lib_TCEmain');
628 $this->tce->stripslashes_values = 0;
629 }
630 }
631 }
632
633 ?>