[BUGFIX] Using datetime field with datepicker the time information gets lost
[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 */
82 public function displayEditPanel($content, array $conf, $currentRecord, array $dataArray) {
83 if ($conf['newRecordFromTable']) {
84 $currentRecord = $conf['newRecordFromTable'] . ':NEW';
85 $conf['allow'] = 'new';
86 $checkEditAccessInternals = FALSE;
87 } else {
88 $checkEditAccessInternals = TRUE;
89 }
90
91 list($table, $uid) = explode(':', $currentRecord);
92
93 // Page ID for new records, 0 if not specified
94 $newRecordPid = intval($conf['newRecordInPid']);
95 if (!$conf['onlyCurrentPid'] || $dataArray['pid'] == $GLOBALS['TSFE']->id) {
96 if ($table == 'pages') {
97 $newUid = $uid;
98 } else {
99 if ($conf['newRecordFromTable']) {
100 $newUid = $GLOBALS['TSFE']->id;
101 if ($newRecordPid) {
102 $newUid = $newRecordPid;
103 }
104 } else {
105 $newUid = -1 * $uid;
106 }
107 }
108 }
109
110 if ($GLOBALS['TSFE']->displayEditIcons && $table && $this->allowedToEdit($table, $dataArray, $conf, $checkEditAccessInternals) && $this->allowedToEditLanguage($table, $dataArray)) {
111 $editClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['edit'];
112 if ($editClass) {
113 $edit = t3lib_div::getUserObj($editClass, FALSE);
114 if (is_object($edit)) {
115 $allowedActions = $this->getAllowedEditActions($table, $conf, $dataArray['pid']);
116 $content = $edit->editPanel($content, $conf, $currentRecord, $dataArray, $table, $allowedActions, $newUid, $this->getHiddenFields($dataArray));
117 }
118 }
119 }
120
121 return $content;
122 }
123
124 /**
125 * 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.
126 * This implements TYPO3 context sensitive editing facilities. Only backend users will have access (if properly configured as well).
127 *
128 * @param string The content to which the edit icons should be appended
129 * @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
130 * @param array TypoScript properties for configuring the edit icons.
131 * @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"
132 * @param array Alternative data array to use. Default is $this->data
133 * @param string Additional URL parameters for the link pointing to alt_doc.php
134 * @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.
135 */
136
137 public function displayEditIcons($content, $params, array $conf = array(), $currentRecord = '', array $dataArray = array(), $addUrlParamStr = '') {
138 // Check incoming params:
139 list($currentRecordTable, $currentRecordUID) = explode(':', $currentRecord);
140 list($fieldList, $table) = array_reverse(t3lib_div::trimExplode(':', $params, 1)); // Reverse the array because table is optional
141 if (!$table) {
142 $table = $currentRecordTable;
143 } elseif ($table != $currentRecordTable) {
144 return $content; // If the table is set as the first parameter, and does not match the table of the current record, then just return.
145 }
146
147 $editUid = $dataArray['_LOCALIZED_UID'] ? $dataArray['_LOCALIZED_UID'] : $currentRecordUID;
148
149 // Edit icons imply that the editing action is generally allowed, assuming page and content element permissions permit it.
150 if (!array_key_exists('allow', $conf)) {
151 $conf['allow'] = 'edit';
152 }
153
154 if ($GLOBALS['TSFE']->displayFieldEditIcons && $table && $this->allowedToEdit($table, $dataArray, $conf) && $fieldList && $this->allowedToEditLanguage($table, $dataArray)) {
155 $editClass = $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/classes/class.frontendedit.php']['edit'];
156 if ($editClass) {
157 $edit = t3lib_div::getUserObj($editClass);
158 if (is_object($edit)) {
159 $content = $edit->editIcons($content, $params, $conf, $currentRecord, $dataArray, $addUrlParamStr, $table, $editUid, $fieldList);
160 }
161 }
162 }
163
164 return $content;
165 }
166
167 /*****************************************************
168 *
169 * Frontend Editing
170 *
171 ****************************************************/
172
173 /**
174 * Returns true if an edit-action is sent from the Admin Panel
175 *
176 * @return boolean
177 * @see index_ts.php
178 */
179 public function isEditAction() {
180 if (is_array($this->TSFE_EDIT)) {
181 if ($this->TSFE_EDIT['cancel']) {
182 unset($this->TSFE_EDIT['cmd']);
183 } else {
184 $cmd = (string) $this->TSFE_EDIT['cmd'];
185 if (($cmd != 'edit' || (is_array($this->TSFE_EDIT['data']) && ($this->TSFE_EDIT['doSave'] || $this->TSFE_EDIT['update'] || $this->TSFE_EDIT['update_close']))) && $cmd != 'new') {
186 // $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.
187 return TRUE;
188 }
189 }
190 }
191 return FALSE;
192 }
193
194 /**
195 * Returns true if an edit form is shown on the page.
196 * Used from index_ts.php where a true return-value will result in classes etc. being included.
197 *
198 * @return boolean
199 * @see index_ts.php
200 */
201 public function isEditFormShown() {
202 if (is_array($this->TSFE_EDIT)) {
203 $cmd = (string) $this->TSFE_EDIT['cmd'];
204 if ($cmd == 'edit' || $cmd == 'new') {
205 return TRUE;
206 }
207 }
208 }
209
210 /**
211 * Management of the on-page frontend editing forms and edit panels.
212 * Basically taking in the data and commands and passes them on to the proper classes as they should be.
213 *
214 * @return void
215 * @throws UnexpectedValueException if TSFE_EDIT[cmd] is not a valid command
216 * @see index_ts.php
217 */
218 public function editAction() {
219 // Commands:
220 list($table, $uid) = explode(':', $this->TSFE_EDIT['record']);
221 $uid = intval($uid);
222 $cmd = $this->TSFE_EDIT['cmd'];
223
224 // Look for some TSFE_EDIT data that indicates we should save.
225 if (($this->TSFE_EDIT['doSave'] || $this->TSFE_EDIT['update'] || $this->TSFE_EDIT['update_close']) && is_array($this->TSFE_EDIT['data'])) {
226 $cmd = 'save';
227 }
228
229 if (($cmd == 'save') || ($cmd && $table && $uid && isset($GLOBALS['TCA'][$table]))) {
230 // Hook for defining custom editing actions. Naming is incorrect, but preserves compatibility.
231 if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['extEditAction'])) {
232 $_params = array();
233 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tsfebeuserauth.php']['extEditAction'] as $_funcRef) {
234 t3lib_div::callUserFunction($_funcRef, $_params, $this);
235 }
236 }
237
238 // Perform the requested editing command.
239 $cmdAction = 'do' . ucwords($cmd);
240 if (is_callable(array($this, $cmdAction))) {
241 $this->$cmdAction($table, $uid);
242 } else {
243 throw new UnexpectedValueException(
244 'The specified frontend edit command (' . $cmd . ') is not valid.',
245 1225818120
246 );
247 }
248 }
249 }
250
251 /**
252 * Hides a specific record.
253 *
254 * @param string The table name for the record to hide.
255 * @param integer The UID for the record to hide.
256 * @return void
257 */
258 public function doHide($table, $uid) {
259 $hideField = $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'];
260 if ($hideField) {
261 $recData = array();
262 $recData[$table][$uid][$hideField] = 1;
263
264 $this->initializeTceMain();
265 $this->tce->start($recData, array());
266 $this->tce->process_datamap();
267 }
268 }
269
270 /**
271 * Unhides (shows) a specific record.
272 *
273 * @param string The table name for the record to unhide.
274 * @param integer The UID for the record to unhide.
275 * @return void
276 */
277 public function doUnhide($table, $uid) {
278 $hideField = $GLOBALS['TCA'][$table]['ctrl']['enablecolumns']['disabled'];
279 if ($hideField) {
280 $recData = array();
281 $recData[$table][$uid][$hideField] = 0;
282
283 $this->initializeTceMain();
284 $this->tce->start($recData, array());
285 $this->tce->process_datamap();
286 }
287 }
288
289 /**
290 * Moves a record up.
291 *
292 * @param string The table name for the record to move.
293 * @param integer The UID for the record to hide.
294 * @return void
295 */
296 public function doUp($table, $uid) {
297 $this->move($table, $uid, 'up');
298 }
299
300 /**
301 * Moves a record down.
302 *
303 * @param string The table name for the record to move.
304 * @param integer The UID for the record to move.
305 * @return void
306 */
307 public function doDown($table, $uid) {
308 $this->move($table, $uid, 'down');
309 }
310
311 /**
312 * Moves a record after a given element. Used for drag.
313 *
314 * @param string The table name for the record to move.
315 * @param integer The UID for the record to move.
316 * @return void
317 */
318 public function doMoveAfter($table, $uid) {
319 $afterUID = $GLOBALS['BE_USER']->frontendEdit->TSFE_EDIT['moveAfter'];
320 $this->move($table, $uid, '', $afterUID);
321 }
322
323 /**
324 * Moves a record
325 *
326 * @param string The table name for the record to move.
327 * @param integer The UID for the record to move.
328 * @param string The direction to move, either 'up' or 'down'.
329 * @param integer The UID of record to move after. This is specified for dragging only.
330 * @return void
331 */
332 protected function move($table, $uid, $direction = '', $afterUID = 0) {
333 $cmdData = array();
334 $sortField = $GLOBALS['TCA'][$table]['ctrl']['sortby'];
335 if ($sortField) {
336 // Get self:
337 $fields = array_unique(t3lib_div::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields'] . ',uid,pid,' . $sortField, TRUE));
338 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(implode(',', $fields), $table, 'uid=' . $uid);
339 if ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
340 // record before or after
341 if (($GLOBALS['BE_USER']->adminPanel instanceOf tslib_AdminPanel) && ($GLOBALS['BE_USER']->adminPanel->extGetFeAdminValue('preview'))) {
342 $ignore = array('starttime' => 1, 'endtime' => 1, 'disabled' => 1, 'fe_group' => 1);
343 }
344 $copyAfterFieldsQuery = '';
345 if ($GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields']) {
346 $cAFields = t3lib_div::trimExplode(',', $GLOBALS['TCA'][$table]['ctrl']['copyAfterDuplFields'], TRUE);
347 foreach ($cAFields as $fieldName) {
348 $copyAfterFieldsQuery .= ' AND ' . $fieldName . '="' . $row[$fieldName] . '"';
349 }
350 }
351 if (!empty($direction)) {
352 if ($direction == 'up') {
353 $operator = '<';
354 $order = 'DESC';
355 } else {
356 $operator = '>';
357 $order = 'ASC';
358 }
359 $sortCheck = ' AND ' . $sortField . $operator . intval($row[$sortField]);
360 }
361 $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(
362 'uid,pid',
363 $table,
364 'pid=' . intval($row['pid']) .
365 $sortCheck .
366 $copyAfterFieldsQuery .
367 $GLOBALS['TSFE']->sys_page->enableFields($table, '', $ignore),
368 '',
369 $sortField . ' ' . $order,
370 '2'
371 );
372 if ($row2 = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {
373 if ($afterUID) {
374 $cmdData[$table][$uid]['move'] = -$afterUID;
375 }
376 elseif ($direction == 'down') {
377 $cmdData[$table][$uid]['move'] = -$row2['uid'];
378 }
379 elseif ($row3 = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) { // Must take the second record above...
380 $cmdData[$table][$uid]['move'] = -$row3['uid'];
381 }
382 else { // ... and if that does not exist, use pid
383 $cmdData[$table][$uid]['move'] = $row['pid'];
384 }
385 } elseif ($direction == 'up') {
386 $cmdData[$table][$uid]['move'] = $row['pid'];
387 }
388 }
389 if (!empty($cmdData)) {
390 $this->initializeTceMain();
391 $this->tce->start(array(), $cmdData);
392 $this->tce->process_cmdmap();
393 }
394 }
395 }
396
397 /**
398 * Deletes a specific record.
399 *
400 * @param string The table name for the record to delete.
401 * @param integer The UID for the record to delete.
402 * @return void
403 */
404 public function doDelete($table, $uid) {
405 $cmdData[$table][$uid]['delete'] = 1;
406 if (count($cmdData)) {
407 $this->initializeTceMain();
408 $this->tce->start(array(), $cmdData);
409 $this->tce->process_cmdmap();
410 }
411 }
412
413 /**
414 * Saves a record based on its data array.
415 *
416 * @param string The table name for the record to save.
417 * @param integer The UID for the record to save.
418 * @return void
419 */
420 public function doSave($table, $uid) {
421 $data = $this->TSFE_EDIT['data'];
422
423 if (!empty($data)) {
424 $this->initializeTceMain();
425 $this->tce->start($data, array());
426 $this->tce->process_uploads($_FILES);
427 $this->tce->process_datamap();
428
429 // Save the new UID back into TSFE_EDIT
430 $newUID = $this->tce->substNEWwithIDs['NEW'];
431 if ($newUID) {
432 $GLOBALS['BE_USER']->frontendEdit->TSFE_EDIT['newUID'] = $newUID;
433 }
434 }
435 }
436
437 /**
438 * Saves a record based on its data array and closes it.
439 *
440 * @param string The table name for the record to save.
441 * @param integer The UID for the record to save.
442 * @return void
443 * @note This method is only a wrapper for doSave() but is needed so
444 * that frontend editing views can handle "save" differently from
445 * "save and close".
446 * Example: When editing a page record, "save" reloads the same
447 * editing form. "Save and close" reloads the entire page at
448 * the appropriate URL.
449 */
450 public function doSaveAndClose($table, $uid) {
451 $this->doSave($table, $uid);
452 }
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 The table name for the record to close.
460 * @param integer 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 The name of the table.
472 * @param array 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 The name of the table.
500 * @param array The data array.
501 * @param array The configuration array for the edit panel.
502 * @param boolean 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 The name of the table.
556 * @param array The configuration array.
557 * @param integer The PID where editing will occur.
558 * @param string 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 * @param none
602 * @return string
603 */
604 public function getJavascriptIncludes() {
605 // No extra JS includes needed
606 return '';
607 }
608
609 /**
610 * Gets the hidden fields (array key=field name, value=field value) to be used in the edit panel for a particular content element.
611 * In the normal case, no hidden fields are needed but special controllers such as TemplaVoila need to track flexform pointers, etc.
612 *
613 * @param array The data array for a specific content element.
614 * @return array
615 */
616 public function getHiddenFields(array $dataArray) {
617 // No special hidden fields needed.
618 return array();
619 }
620
621 /**
622 * Initializes t3lib_TCEmain since it is used on modification actions.
623 *
624 * @return void
625 */
626 protected function initializeTceMain() {
627 if (!isset($this->tce)) {
628 $this->tce = t3lib_div::makeInstance('t3lib_TCEmain');
629 $this->tce->stripslashes_values = 0;
630 }
631 }
632 }
633
634 if (defined('TYPO3_MODE') && isset($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_frontendedit.php'])) {
635 include_once($GLOBALS['TYPO3_CONF_VARS'][TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_frontendedit.php']);
636 }
637
638 ?>