235 $this->perms_clause =
$GLOBALS[
'BE_USER']->getPagePermsClause(1);
236 $this->backPath =
$GLOBALS[
'BACK_PATH'];
249 $this->externalTables =
$GLOBALS[
'TYPO3_CONF_VARS'][
'EXTCONF'][
'cms'][
'db_layout'][
'addTables'];
255 $this->current_sys_language = (int)$this->MOD_SETTINGS[
'language'];
257 $this->descrTable =
'_MOD_' . $this->MCONF[
'name'];
268 $this->MOD_MENU = array(
269 'tt_content_showHidden' =>
'',
270 'showPalettes' =>
'',
271 'showDescriptions' =>
'',
274 0 =>
$GLOBALS[
'LANG']->getLL(
'm_function_0'),
275 1 =>
$GLOBALS[
'LANG']->getLL(
'm_function_1'),
276 2 =>
$GLOBALS[
'LANG']->getLL(
'm_function_2')
279 0 =>
$GLOBALS[
'LANG']->getLL(
'm_default')
288 if (is_array($this->externalTables)) {
289 foreach ($this->externalTables as $table => $tableSettings) {
291 if (is_array($this->MOD_MENU[$table])) {
292 unset($this->MOD_MENU[$table]);
294 if (is_array($tableSettings) && count($tableSettings) > 1) {
295 foreach ($tableSettings as $key => $settings) {
296 $this->MOD_MENU[$table][$key] =
$GLOBALS[
'LANG']->sL($settings[
'MENU']);
303 while ($lrow =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res)) {
304 if (
$GLOBALS[
'BE_USER']->checkLanguageAccess($lrow[
'uid'])) {
305 $this->MOD_MENU[
'language'][$lrow[
'uid']] = $lrow[
'hidden'] ?
'(' . $lrow[
'title'] .
')' : $lrow[
'title'];
309 $count =
$GLOBALS[
'TYPO3_DB']->exec_SELECTcountRows(
'uid',
'sys_language',
$GLOBALS[
'BE_USER']->isAdmin() ?
'' :
'hidden=0');
311 unset($this->MOD_MENU[
'function'][
'2']);
316 if ($this->modTSconfig[
'properties'][
'QEisDefault']) {
317 ksort($this->MOD_MENU[
'function']);
322 unset($this->MOD_MENU[
'function'][0]);
325 if (($this->modSharedTSconfig[
'properties'][
'defaultLanguageLabel'] || $this->modTSconfig[
'properties'][
'defaultLanguageLabel']) && isset($this->MOD_MENU[
'language'][0])) {
326 $this->MOD_MENU[
'language'][0] = $this->modTSconfig[
'properties'][
'defaultLanguageLabel'] ? $this->modTSconfig[
'properties'][
'defaultLanguageLabel'] : $this->modSharedTSconfig[
'properties'][
'defaultLanguageLabel'];
331 if (
$GLOBALS[
'BE_USER']->workspace != 0 || $this->MOD_SETTINGS[
'tt_content_showHidden'] !==
'0') {
332 $this->MOD_SETTINGS[
'tt_content_showHidden'] = 1;
343 if ($this->clear_cache) {
345 $tce->stripslashes_values = 0;
346 $tce->start(array(), array());
347 $tce->clear_cacheCmd($this->
id);
359 if ($this->pageinfo[
'doktype'] == \
TYPO3\CMS\Frontend\Page\PageRepository::DOKTYPE_SYSFOLDER) {
362 $moduleLoader->load(
$GLOBALS[
'TBE_MODULES']);
363 $modules = $moduleLoader->modules;
364 if (is_array($modules[
'web'][
'sub'][
'list'])) {
366 <p>' .
IconUtility::getSpriteIcon(
'actions-system-list-open') .
'<a href="javascript:top.goToModule( \'web_list\',1);">' .
$GLOBALS[
'LANG']->getLL(
'goToListModule') .
' 369 $content .= $flashMessage->render();
373 if ($this->pageinfo[
'content_from_pid']) {
374 $contentPage = BackendUtility::getRecord(
'pages', (
int)$this->pageinfo[
'content_from_pid']);
377 $link =
'<a href="' . $linkToPid .
'">' . htmlspecialchars($title) .
' (PID ' . (int)$this->pageinfo[
'content_from_pid'] .
')</a>';
379 $content .= $flashMessage->render();
389 if ($this->current_sys_language > 0) {
390 $overlayRecord =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetSingleRow(
392 'pages_language_overlay',
393 'pid = ' . (
int)$this->
id .
394 ' AND sys_language_uid = ' . (
int)$this->current_sys_language .
402 return $overlayRecord[
'title'];
404 return $this->pageinfo[
'title'];
418 $access = is_array($this->pageinfo) ? 1 : 0;
419 if ($this->
id && $access) {
421 $this->CALC_PERMS =
$GLOBALS[
'BE_USER']->calcPerms($this->pageinfo);
422 $this->EDIT_CONTENT = $this->CALC_PERMS & 16 ? 1 : 0;
425 $this->doc->backPath =
$GLOBALS[
'BACK_PATH'];
426 $this->doc->setModuleTemplate(
'EXT:backend/Resources/Private/Templates/db_layout.html');
431 $this->doc->JScodeArray[
'jumpToUrl'] =
' 432 function jumpToUrl(URL,formEl) { 433 if (document.editform && TBE_EDITOR.isFormChanged) { // Check if the function exists... (works in all browsers?) 434 if (!TBE_EDITOR.isFormChanged()) { 435 window.location.href = URL; 437 if (formEl.type=="checkbox") formEl.checked = formEl.checked ? 0 : 1; 440 window.location.href = URL; 445 $this->doc->JScode .= $this->doc->wrapScriptTags(
' 446 if (top.fsMod) top.fsMod.recentIds["web"] = ' . (
int)$this->
id .
'; 447 if (top.fsMod) top.fsMod.navFrameHighlightedID["web"] = "pages' . (
int)$this->
id .
'_"+top.fsMod.currentBank; ' . (
int)$this->
id .
'; 450 function deleteRecord(table,id,url) { // 452 window.location.href = "' .
$GLOBALS[
'BACK_PATH'] .
'tce_db.php?cmd["+table+"]["+id+"][delete]=1&redirect="+escape(url)+"&vC=' .
$GLOBALS[
'BE_USER']->veriCode() .
BackendUtility::getUrlToken(
'tceAction') .
'&prErr=1&uPT=1"; 457 $this->doc->JScode .= $this->doc->wrapScriptTags(
' 459 var DTM_origClass = ""; 461 // if tabs are used in a popup window the array might not exists 462 if(!top.DTM_currentTabs) { 463 top.DTM_currentTabs = []; 466 function DTM_activate(idBase,index,doToogle) { // 468 if (DTM_array[idBase]) { 469 for(cnt = 0; cnt < DTM_array[idBase].length ; cnt++) { 470 if (DTM_array[idBase][cnt] != idBase+"-"+index) { 471 document.getElementById(DTM_array[idBase][cnt]+"-DIV").style.display = "none"; 472 document.getElementById(DTM_array[idBase][cnt]+"-MENU").attributes.getNamedItem("class").nodeValue = "tab"; 478 if (document.getElementById(idBase+"-"+index+"-DIV")) { 479 if (doToogle && document.getElementById(idBase+"-"+index+"-DIV").style.display == "block") { 480 document.getElementById(idBase+"-"+index+"-DIV").style.display = "none"; 481 if(DTM_origClass=="") { 482 document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab"; 484 DTM_origClass = "tab"; 486 top.DTM_currentTabs[idBase] = -1; 488 document.getElementById(idBase+"-"+index+"-DIV").style.display = "block"; 489 if(DTM_origClass=="") { 490 document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact"; 492 DTM_origClass = "tabact"; 494 top.DTM_currentTabs[idBase] = index; 498 function DTM_toggle(idBase,index,isInit) { // 500 if (document.getElementById(idBase+"-"+index+"-DIV")) { 501 if (document.getElementById(idBase+"-"+index+"-DIV").style.display == "block") { 502 document.getElementById(idBase+"-"+index+"-DIV").style.display = "none"; 504 document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tab"; 506 DTM_origClass = "tab"; 508 top.DTM_currentTabs[idBase+"-"+index] = 0; 510 document.getElementById(idBase+"-"+index+"-DIV").style.display = "block"; 512 document.getElementById(idBase+"-"+index+"-MENU").attributes.getNamedItem("class").nodeValue = "tabact"; 514 DTM_origClass = "tabact"; 516 top.DTM_currentTabs[idBase+"-"+index] = 1; 521 function DTM_mouseOver(obj) { // 522 DTM_origClass = obj.attributes.getNamedItem(\'class\').nodeValue; 523 obj.attributes.getNamedItem(\'class\').nodeValue += "_over"; 526 function DTM_mouseOut(obj) { // 527 obj.attributes.getNamedItem(\'class\').nodeValue = DTM_origClass; 532 $this->doc->form =
'<form action="' . htmlspecialchars((
'db_layout.php?id=' . $this->
id .
'&imagemode=' . $this->imagemode)) .
'" method="post">';
534 $this->topFuncMenu =
BackendUtility::getFuncMenu($this->
id,
'SET[function]', $this->MOD_SETTINGS[
'function'], $this->MOD_MENU[
'function'],
'db_layout.php',
'');
535 $this->languageMenu = count($this->MOD_MENU[
'language']) > 1 ?
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_general.xlf:LGL.language', TRUE) .
BackendUtility::getFuncMenu($this->
id,
'SET[language]', $this->current_sys_language, $this->MOD_MENU[
'language'],
'db_layout.php',
'') :
'';
538 if (count($backendLayout[
'__colPosList'])) {
539 $this->colPosList = implode(
',', $backendLayout[
'__colPosList']);
544 if (isset($this->modSharedTSconfig[
'properties'][
'colPos_list']) && trim($this->modSharedTSconfig[
'properties'][
'colPos_list']) !==
'') {
545 $this->activeColPosList = array_unique(
GeneralUtility::intExplode(
',', trim($this->modSharedTSconfig[
'properties'][
'colPos_list'])));
547 if (!empty($this->colPosList) && !empty($this->activeColPosList)) {
548 $this->activeColPosList = array_unique(array_intersect(
549 $this->activeColPosList,
556 $this->activeColPosList = implode(
',', $this->activeColPosList);
557 $this->colPosList = implode(
',', $this->colPosList);
563 if ($this->MOD_SETTINGS[
'function'] == 0) {
565 $body .= $this->renderQuickEdit();
568 $body .= $this->renderListContent();
571 $docHeaderButtons = $this->
getButtons($this->MOD_SETTINGS[
'function'] == 0 ?
'quickEdit' :
'');
573 'CSH' => $docHeaderButtons[
'csh'],
574 'TOP_FUNCTION_MENU' => $this->topFuncMenu . $this->editSelect,
575 'LANGSELECTOR' => $this->languageMenu,
579 $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
581 $this->content = $this->doc->render(
$GLOBALS[
'LANG']->getLL(
'title'), $this->content);
585 $this->doc->backPath =
$GLOBALS[
'BACK_PATH'];
586 $this->doc->setModuleTemplate(
'EXT:backend/Resources/Private/Templates/db_layout.html');
587 $this->doc->JScode = $this->doc->wrapScriptTags(
' 588 if (top.fsMod) top.fsMod.recentIds["web"] = ' . (
int)$this->
id .
'; 591 $body = $flashMessage->render();
593 $docHeaderButtons = array(
595 'history_page' =>
'',
609 'history_record' =>
'',
610 'edit_language' =>
'' 614 'TOP_FUNCTION_MENU' =>
'',
615 'LANGSELECTOR' =>
'',
618 $this->content .= $this->doc->moduleBody($this->pageinfo, $docHeaderButtons, $markers);
620 $this->content = $this->doc->render(
$GLOBALS[
'LANG']->getLL(
'title'), $this->content);
630 public function renderQuickEdit() {
632 $this->doc->setModuleTemplate(
'EXT:backend/Resources/Private/Templates/db_layout_quickedit.html');
634 $this->doc->form =
'<form action="' . htmlspecialchars((
$GLOBALS[
'BACK_PATH'] .
'tce_db.php?&prErr=1&uPT=1')) .
'" method="post" enctype="' .
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'form_enctype'] .
'" name="editform" onsubmit="return TBE_EDITOR.checkSubmit(1);">';
636 $this->doc->getContextMenuCode();
643 while ($cRow =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res)) {
644 $idListA[] = $cRow[
'uid'];
646 $url =
$GLOBALS[
'BACK_PATH'] .
'alt_doc.php?edit[tt_content][' . implode(
',', $idListA) .
']=edit&returnUrl=' . rawurlencode($this->
local_linkThisScript(array(
'edit_record' =>
'')));
650 if ($this->new_unique_uid) {
651 $res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
'*',
'sys_log',
'userid=' . (
int)
$GLOBALS[
'BE_USER']->user[
'uid'] .
' AND NEWid=' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr($this->new_unique_uid,
'sys_log'));
652 $sys_log_row =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res);
653 if (is_array($sys_log_row)) {
654 $edit_record = $sys_log_row[
'tablename'] .
':' . $sys_log_row[
'recuid'];
660 $languageOverlayRecord =
'';
661 if ($this->current_sys_language) {
662 list($languageOverlayRecord) =
BackendUtility::getRecordsByField(
'pages_language_overlay',
'pid', $this->
id,
'AND sys_language_uid=' . (
int)$this->current_sys_language);
664 if (is_array($languageOverlayRecord)) {
665 $inValue =
'pages_language_overlay:' . $languageOverlayRecord[
'uid'];
667 $opt[] =
'<option value="' . $inValue .
'"' . (
$edit_record == $inValue ?
' selected="selected"' :
'') .
'>[ ' .
$GLOBALS[
'LANG']->getLL(
'editLanguageHeader', TRUE) .
' ]</option>';
671 $opt[] =
'<option value="' . $inValue .
'"' . (
$edit_record == $inValue ?
' selected="selected"' :
'') .
'>[ ' .
$GLOBALS[
'LANG']->getLL(
'editPageProperties', TRUE) .
' ]</option>';
679 while ($cRow =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res)) {
681 if (is_array($cRow)) {
688 if (!isset($colPos) || $cRow[
'colPos'] !== $colPos) {
689 $colPos = $cRow[
'colPos'];
690 $opt[] =
'<option value=""></option>';
693 $inValue =
'tt_content:' . $cRow[
'uid'];
695 $opt[] =
'<option value="' . $inValue .
'"' . (
$edit_record == $inValue ?
' selected="selected"' :
'') .
'>' . htmlspecialchars(
GeneralUtility::fixed_lgd_cs(($cRow[
'header'] ? $cRow[
'header'] :
'[' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.no_title') .
'] ' . strip_tags($cRow[
'bodytext'])),
$GLOBALS[
'BE_USER']->uc[
'titleLen'])) .
'</option>';
696 $prev = -$cRow[
'uid'];
701 $edit_record =
'tt_content:new/' . $prev .
'/' . $colPos;
702 $inValue =
'tt_content:new/' . $prev .
'/' . $colPos;
704 $opt[] =
'<option value="' . $inValue .
'"' . (
$edit_record == $inValue ?
' selected="selected"' :
'') .
'>[ ' .
$GLOBALS[
'LANG']->getLL(
'newLabel', 1) .
' ]</option>';
708 $opt[] =
'<option value=""></option>';
709 $opt[] =
'<option value="' .
$edit_record .
'" selected="selected">[ ' .
$GLOBALS[
'LANG']->getLL(
'newLabel', TRUE) .
' ]</option>';
716 $this->undoButton = 0;
721 $this->undoButtonR =
false;
723 $undoRes =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
'tstamp',
'sys_history',
'tablename=' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr($this->eRParts[0],
'sys_history') .
' AND recuid=' . (
int)$this->eRParts[1],
'',
'tstamp DESC',
'1');
724 $this->undoButtonR =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($undoRes);
726 if ($this->undoButtonR) {
727 $this->undoButton = 1;
732 unset($R_URL_getvars[
'popView']);
733 unset($R_URL_getvars[
'new_unique_uid']);
739 if ($this->returnUrl) {
743 $retUrlStr = $this->returnUrl ?
'+\'&returnUrl=\'+\'' . rawurlencode($this->returnUrl) .
'\'' :
'';
745 $this->editSelect =
'<select name="edit_record" onchange="' . htmlspecialchars((
'jumpToUrl(' .
GeneralUtility::quoteJSvalue(
'db_layout.php?id=' . $this->
id .
'&edit_record=') .
'+escape(this.options[this.selectedIndex].value)' . $retUrlStr .
',this);')) .
'">' . implode(
'', $opt) .
'</select>';
747 if (
$GLOBALS[
'BE_USER']->check(
'tables_modify', $this->eRParts[0]) &&
$edit_record && ($this->eRParts[0] !==
'pages' && $this->EDIT_CONTENT || $this->eRParts[0] ===
'pages' && $this->CALC_PERMS & 1)) {
749 list($uidVal, $ex_pid, $ex_colPos) = explode(
'/', $this->eRParts[1]);
751 if ($uidVal !=
'new') {
753 $uidVal = $draftRecord[
'uid'];
758 $trData->addRawData = TRUE;
759 $trData->defVals[$this->eRParts[0]] = array(
760 'colPos' => (
int)$ex_colPos,
761 'sys_language_uid' => (
int)$this->current_sys_language
763 $trData->disableRTE = $this->MOD_SETTINGS[
'disableRTE'];
764 $trData->lockRecords = 1;
766 $trData->fetchRecord($this->eRParts[0], $uidVal ==
'new' ? $this->
id : $uidVal, $uidVal);
768 reset($trData->regTableItems_data);
769 $rec = current($trData->regTableItems_data);
770 if ($uidVal ==
'new') {
773 $rec[
'pid'] = (int)$ex_pid ?: $this->
id;
774 $recordAccess = TRUE;
776 $rec[
'uid'] = $uidVal;
778 $recordAccess =
$GLOBALS[
'BE_USER']->recordEditAccessInternals($this->eRParts[0], $uidVal);
780 if (!$recordAccess) {
782 $content = $this->doc->section(
$GLOBALS[
'LANG']->getLL(
'noAccess'),
$GLOBALS[
'LANG']->getLL(
'noAccess_msg') .
'<br /><br />' . (
$GLOBALS[
'BE_USER']->errorMsg ?
'Reason: ' .
$GLOBALS[
'BE_USER']->errorMsg .
'<br /><br />' :
''), 0, 1);
783 } elseif (is_array($rec)) {
787 $tceforms->backPath =
$GLOBALS[
'BACK_PATH'];
788 $tceforms->initDefaultBEMode();
789 $tceforms->fieldOrder = $this->modTSconfig[
'properties'][
'tt_content.'][
'fieldOrder'];
790 $tceforms->palettesCollapsed = !$this->MOD_SETTINGS[
'showPalettes'];
791 $tceforms->disableRTE = $this->MOD_SETTINGS[
'disableRTE'];
792 $tceforms->enableClickMenu = TRUE;
797 $tceforms->clipObj->initializeClipboard();
800 $panel .= $tceforms->getMainFields($this->eRParts[0], $rec);
801 $panel = $tceforms->wrapTotal($panel, $rec, $this->eRParts[0]);
804 if ($uidVal ==
'new') {
805 $theCode .=
'<input type="hidden" name="data[' . $this->eRParts[0] .
'][' . $rec[
'uid'] .
'][pid]" value="' . $rec[
'pid'] .
'" />';
808 <input type="hidden" name="_serialNumber" value="' . md5(microtime()) .
'" /> 809 <input type="hidden" name="_disableRTE" value="' . $tceforms->disableRTE .
'" /> 810 <input type="hidden" name="edit_record" value="' .
$edit_record .
'" /> 811 <input type="hidden" name="redirect" value="' . htmlspecialchars(($uidVal ==
'new' ?
ExtensionManagementUtility::extRelPath(
'cms') .
'layout/db_layout.php?id=' . $this->
id .
'&new_unique_uid=' .
$new_unique_uid .
'&returnUrl=' . rawurlencode($this->returnUrl) : $this->R_URI)) .
'" /> 814 $theCode = $tceforms->printNeededJSFunctions_top() . $theCode . $tceforms->printNeededJSFunctions();
821 $defaultFlashMessageQueue = $flashMessageService->getMessageQueueByIdentifier();
822 $defaultFlashMessageQueue->enqueue($flashMessage);
825 $content = $this->doc->section(
'', $theCode);
829 $content = $this->doc->section(
$GLOBALS[
'LANG']->getLL(
'noAccess'),
$GLOBALS[
'LANG']->getLL(
'noAccess_msg') .
'<br /><br />', 0, 1);
833 $h_func_b =
BackendUtility::getFuncCheck($this->
id,
'SET[tt_content_showHidden]', $this->MOD_SETTINGS[
'tt_content_showHidden'],
'db_layout.php',
'',
'id="checkTt_content_showHidden"') .
'<label for="checkTt_content_showHidden">' . (!$q_count ?
$GLOBALS[
'TBE_TEMPLATE']->dfw(
$GLOBALS[
'LANG']->getLL(
'hiddenCE', TRUE)) :
$GLOBALS[
'LANG']->getLL(
'hiddenCE', TRUE) .
' (' . $q_count .
')') .
'</label>';
834 $h_func_b .=
'<br />' .
BackendUtility::getFuncCheck($this->
id,
'SET[showPalettes]', $this->MOD_SETTINGS[
'showPalettes'],
'db_layout.php',
'',
'id="checkShowPalettes"') .
'<label for="checkShowPalettes">' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.showPalettes', TRUE) .
'</label>';
836 $h_func_b .=
'<br />' .
BackendUtility::getFuncCheck($this->
id,
'SET[showDescriptions]', $this->MOD_SETTINGS[
'showDescriptions'],
'db_layout.php',
'',
'id="checkShowDescriptions"') .
'<label for="checkShowDescriptions">' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.showDescriptions', TRUE) .
'</label>';
839 $h_func_b .=
'<br />' .
BackendUtility::getFuncCheck($this->
id,
'SET[disableRTE]', $this->MOD_SETTINGS[
'disableRTE'],
'db_layout.php',
'',
'id="checkDisableRTE"') .
'<label for="checkDisableRTE">' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.disableRTE', TRUE) .
'</label>';
842 $content .= $this->doc->section(
'', $h_func_b, 0, 0);
847 $posMap->backPath =
$GLOBALS[
'BACK_PATH'];
852 $HTMLcode .= $posMap->printContentElementColumns($this->
id, $this->eRParts[1], $this->colPosList, $this->MOD_SETTINGS[
'tt_content_showHidden'], $this->R_URI);
854 $content .= $this->doc->section(
$GLOBALS[
'LANG']->getLL(
'CEonThisPage'), $HTMLcode, 0, 1);
858 if (count($tceforms->commentMessages)) {
860 <!-- TCEFORM messages 861 ' . htmlspecialchars(implode(LF, $tceforms->commentMessages)) .
' 874 public function renderListContent() {
878 $dblist->backPath =
$GLOBALS[
'BACK_PATH'];
880 $dblist->no_noWrap = 1;
883 $dblist->script =
'db_layout.php';
884 $dblist->showIcon = 0;
885 $dblist->setLMargin = 0;
888 $dblist->agePrefixes =
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears');
891 $dblist->option_showBigButtons = $this->modTSconfig[
'properties'][
'disableBigButtons'] ===
'0';
892 $dblist->option_newWizard = $this->modTSconfig[
'properties'][
'disableNewContentElementWizard'] ? 0 : 1;
893 $dblist->defLangBinding = $this->modTSconfig[
'properties'][
'defLangBinding'] ? 1 : 0;
894 if (!$dblist->nextThree) {
895 $dblist->nextThree = 1;
899 $h_menu = $dblist->getTableMenu($this->
id);
902 $tableOutput = array();
903 $tableJSOutput = array();
907 foreach ($dblist->activeTables as $table => $value) {
908 if (!isset($dblist->externalTables[$table])) {
910 $h_func_b =
BackendUtility::getFuncCheck($this->
id,
'SET[tt_content_showHidden]', $this->MOD_SETTINGS[
'tt_content_showHidden'],
'db_layout.php',
'',
'id="checkTt_content_showHidden"') .
'<label for="checkTt_content_showHidden">' . (!$q_count ?
$GLOBALS[
'TBE_TEMPLATE']->dfw(
$GLOBALS[
'LANG']->getLL(
'hiddenCE')) :
$GLOBALS[
'LANG']->getLL(
'hiddenCE') .
' (' . $q_count .
')') .
'</label>';
912 $dblist->tt_contentConfig[
'showCommands'] = 1;
914 $dblist->tt_contentConfig[
'showInfo'] = 1;
917 $dblist->tt_contentConfig[
'single'] = 0;
918 if ($this->MOD_SETTINGS[
'function'] == 4) {
920 $dblist->tt_contentConfig[
'showAsGrid'] = 1;
923 if (is_array(
$GLOBALS[
'TCA'][
'tt_content'][
'columns'][
'colPos'][
'config'][
'items'])) {
926 foreach ($tcaItems as $temp) {
927 $colList[] = $temp[1];
931 $colList = array(
'1',
'0',
'2',
'3');
933 if ($this->colPosList !==
'') {
937 if (count($colList) === 1 && !$this->MOD_SETTINGS[
'function'] === 4) {
940 $dblist->tt_contentConfig[
'single'] = 1;
942 $dblist->tt_contentConfig[
'showSingleCol'] = current($colList);
945 $dblist->tt_contentConfig[
'cols'] = implode(
',', $colList);
947 $dblist->tt_contentConfig[
'showHidden'] = $this->MOD_SETTINGS[
'tt_content_showHidden'];
948 $dblist->tt_contentConfig[
'sys_language_uid'] = (int)$this->current_sys_language;
950 if ($this->MOD_SETTINGS[
'function'] == 2) {
951 $dblist->tt_contentConfig[
'single'] = 0;
952 $dblist->tt_contentConfig[
'languageMode'] = 1;
953 $dblist->tt_contentConfig[
'languageCols'] = $this->MOD_MENU[
'language'];
957 if (isset($this->MOD_SETTINGS) && isset($this->MOD_MENU)) {
958 $h_func =
BackendUtility::getFuncMenu($this->
id,
'SET[' . $table .
']', $this->MOD_SETTINGS[$table], $this->MOD_MENU[$table],
'db_layout.php',
'');
964 $dblist->itemsLimitSingleTable = 1000;
965 $dblist->start($this->
id, $table, $this->pointer, $this->search_field, $this->search_levels, $this->showLimit);
966 $dblist->counter = $CMcounter;
967 $dblist->ext_function = $this->MOD_SETTINGS[
'function'];
969 $dblist->HTMLcode .= $this->doc->getVersionSelector($this->
id);
971 $dblist->generateList();
973 $tableOutput[$table] = ($h_func ? $h_func .
'<br /><img src="clear.gif" width="1" height="4" alt="" /><br />' :
'') . $dblist->HTMLcode . ($h_func_b ?
'<img src="clear.gif" width="1" height="10" alt="" /><br />' . $h_func_b :
'');
975 $tableJSOutput[$table] = $dblist->JScode;
977 $CMcounter += $dblist->counter;
979 $dblist->HTMLcode =
'';
980 $dblist->JScode =
'';
986 $this->doc->getContextMenuCode();
990 $headerContentHook =
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'cms/layout/db_layout.php'][
'drawHeaderHook'];
991 if (is_array($headerContentHook)) {
992 foreach ($headerContentHook as $hook) {
998 foreach ($tableOutput as $table => $output) {
999 $content .= $this->doc->section(
'', $output, TRUE, TRUE, 0, TRUE);
1000 $content .= $this->doc->spacer(15);
1001 $content .= $this->doc->sectionEnd();
1004 if (!$this->modTSconfig[
'properties'][
'disableSearchBox'] && count($tableOutput)) {
1006 $content .= $this->doc->section($sectionTitle, $dblist->getSearchBox(0), FALSE, TRUE, FALSE, TRUE);
1009 $footerContentHook =
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'cms/layout/db_layout.php'][
'drawFooterHook'];
1010 if (is_array($footerContentHook)) {
1011 foreach ($footerContentHook as $hook) {
1043 'history_page' =>
'',
1044 'new_content' =>
'',
1046 'move_record' =>
'',
1049 'edit_language' =>
'',
1055 'savedokshow' =>
'',
1059 'history_record' =>
'' 1066 if (
$GLOBALS[
'BE_USER']->mayMakeShortcut()) {
1067 $buttons[
'shortcut'] = $this->doc->makeShortcutIcon(
'id, edit_record, pointer, new_unique_uid, search_field, search_levels, showLimit', implode(
',', array_keys($this->MOD_MENU)), $this->MCONF[
'name']);
1070 if (!$this->modTSconfig[
'properties'][
'disableAdvanced']) {
1071 $buttons[
'cache'] =
'<a href="' . htmlspecialchars((
'db_layout.php?id=' . $this->pageinfo[
'uid'] .
'&clear_cache=1')) .
'" title="' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.clear_cache', TRUE) .
'">' .
IconUtility::getSpriteIcon(
'actions-system-cache-clear') .
'</a>';
1073 if (!$this->modTSconfig[
'properties'][
'disableIconToolbar']) {
1076 $buttons[
'move_record'] =
'<a href="' . htmlspecialchars((
$GLOBALS[
'BACK_PATH'] .
'move_el.php?table=' . $this->eRParts[0] .
'&uid=' . $this->eRParts[1] .
'&returnUrl=' . rawurlencode(
GeneralUtility::getIndpEnv(
'REQUEST_URI')))) .
'">' .
IconUtility::getSpriteIcon((
'actions-' . ($this->eRParts[0] ==
'tt_content' ?
'document' :
'page') .
'-move'), array(
'class' =>
'c-inputButton',
'title' =>
$GLOBALS[
'LANG']->getLL((
'move_' . ($this->eRParts[0] ==
'tt_content' ?
'record' :
'page')), TRUE))) .
'</a>';
1080 if ($this->CALC_PERMS & 2) {
1083 if ($this->MOD_SETTINGS[
'function'] == 1 && $this->current_sys_language > 0) {
1084 $overlayRecord =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetSingleRow(
1086 'pages_language_overlay',
1087 'pid = ' . (
int)$this->
id .
' ' .
1088 'AND sys_language_uid = ' . (
int)$this->current_sys_language .
1097 $editLanguageOnClick = htmlspecialchars(
1099 '&edit[pages_language_overlay][' . $overlayRecord[
'uid'] .
']=edit',
1102 $buttons[
'edit_language'] =
'<a href="#" ' .
1103 'onclick="' . $editLanguageOnClick .
'"' .
1104 'title="' .
$GLOBALS[
'LANG']->getLL(
'editPageLanguageOverlayProperties', TRUE) .
'">' .
1111 $editPageOnClick = htmlspecialchars(
1114 $buttons[
'edit_page'] =
'<a href="#" ' .
1115 'onclick="' . $editPageOnClick .
'"' .
1116 'title="' .
$GLOBALS[
'LANG']->getLL(
'editPageProperties', TRUE) .
'">' .
1122 if ($function ==
'quickEdit') {
1125 $buttons[
'csh'] =
BackendUtility::cshItem($this->descrTable,
'columns_' . $this->MOD_SETTINGS[
'function'],
$GLOBALS[
'BACK_PATH'],
'', TRUE,
'margin-top: 0px; margin-bottom: 0px;');
1127 if ($function ==
'quickEdit') {
1129 $buttons[
'savedok'] =
IconUtility::getSpriteIcon(
'actions-document-save', array(
'html' =>
'<input type="image" name="_savedok" class="c-inputButton" src="clear.gif" title="' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:rm.saveDoc', TRUE) .
'" />'));
1131 $buttons[
'save_close'] =
IconUtility::getSpriteIcon(
'actions-document-save-close', array(
'html' =>
'<input type="image" class="c-inputButton" name="_saveandclosedok" src="clear.gif" title="' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:rm.saveCloseDoc', TRUE) .
'" />'));
1133 $buttons[
'savedokshow'] =
'<a href="#" onclick="' . htmlspecialchars(
'document.editform.redirect.value+=\'&popView=1\'; TBE_EDITOR.checkAndDoSubmit(1); return false;') .
'" title="' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:rm.saveDocShow', TRUE) .
'">' .
IconUtility::getSpriteIcon(
'actions-document-save-view') .
'</a>';
1135 $buttons[
'closedok'] =
'<a href="#" onclick="' . htmlspecialchars((
'jumpToUrl(unescape(\'' . rawurlencode($this->closeUrl) .
'\'));
return false;
')) . '" title="' . $GLOBALS['LANG
']->sL('LLL:EXT:lang/locallang_core.xlf:rm.closeDoc
', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-close') . '</a>'; 1137 if ($this->deleteButton) { 1138 $buttons['deletedok'] = '<a href="#
" onclick="' . htmlspecialchars(('return deleteRecord(\
'' . $this->eRParts[0] .
'\',\
'' . $this->eRParts[1] .
'\',\
'' .
GeneralUtility::getIndpEnv(
'SCRIPT_NAME') .
'?id=' . $this->
id .
'\');
')) . '" title="' . $GLOBALS['LANG
']->getLL('deleteItem
', TRUE) . '">' . IconUtility::getSpriteIcon('actions-edit-delete') . '</a>'; 1140 if ($this->undoButton) { 1142 $buttons['undo'] = '<a href="#
" 1143 onclick="' . htmlspecialchars('window.location.href=
' . 1144 GeneralUtility::quoteJSvalue( 1145 $GLOBALS['BACK_PATH
'] . 1146 BackendUtility::getModuleUrl( 1149 'element
' => $this->eRParts[0] . ':
' . $this->eRParts[1], 1150 'revert
' => 'ALL_FIELDS
', 1152 'returnUrl
' => $this->R_URI, 1155 ) . ';
return false;
') . '" 1156 title="' . htmlspecialchars(sprintf($GLOBALS['LANG
']->getLL('undoLastChange
'), BackendUtility::calcAge(($GLOBALS['EXEC_TIME
'] - $this->undoButtonR['tstamp
']), $GLOBALS['LANG
']->sL('LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears
')))) . '">' . IconUtility::getSpriteIcon('actions-edit-undo') . '</a>'; 1158 $buttons['history_record'] = '<a href="#
" 1159 onclick="' . htmlspecialchars('jumpToUrl(
' . 1160 GeneralUtility::quoteJSvalue( 1161 $GLOBALS['BACK_PATH
'] . 1162 BackendUtility::getModuleUrl( 1165 'element
' => $this->eRParts[0] . ':
' . $this->eRParts[1], 1166 'returnUrl
' => $this->R_URI, 1169 ) . ');
return false;
') . '" 1170 title="' . $GLOBALS['LANG
']->getLL('recordHistory', TRUE) . '">' . IconUtility::getSpriteIcon('actions-document-history-open') . '</a>'; 1177 /******************************* 1181 ******************************/ 1189 public function getNumberOfHiddenElements() { 1190 return $GLOBALS['TYPO3_DB']->exec_SELECTcountRows( 1193 'pid=' . (int)$this->id . ' AND sys_language_uid=' . (int)$this->current_sys_language . BackendUtility::BEenableFields('tt_content', 1) . BackendUtility::deleteClause('tt_content') . BackendUtility::versioningPlaceholderClause('tt_content') 1205 public function local_linkThisScript($params) { 1206 $params['popView'] = ''; 1207 $params['new_unique_uid'] = ''; 1208 return GeneralUtility::linkThisScript($params); 1218 public function exec_languageQuery($id) { 1220 $exQ = BackendUtility::deleteClause('pages_language_overlay') . 1221 ($GLOBALS['BE_USER']->isAdmin() ? '' : ' AND sys_language.hidden=0'); 1222 return $GLOBALS['TYPO3_DB']->exec_SELECTquery( 1224 'pages_language_overlay,sys_language', 1225 'pages_language_overlay.sys_language_uid=sys_language.uid AND pages_language_overlay.pid=' . (int)$id . $exQ . 1226 BackendUtility::versioningPlaceholderClause('pages_language_overlay'), 1227 'pages_language_overlay.sys_language_uid,sys_language.uid,sys_language.pid,sys_language.tstamp,sys_language.hidden,sys_language.title,sys_language.static_lang_isocode,sys_language.flag', 1228 'sys_language.title' 1231 return $GLOBALS['TYPO3_DB']->exec_SELECTquery( 1234 'sys_language.hidden=0', 1236 'sys_language.title'
local_linkThisScript($params)
static getFuncCheck($mainParams, $elementName, $currentValue, $script='', $addParams='', $tagParams='')
static readPageAccess($id, $perms_clause)
static getWorkspaceVersionOfRecord($workspace, $table, $uid, $fields=' *')
static getModTSconfig($id, $TSref)
static editOnClick($params, $backPath='', $requestUri='')
static getRecordsByField($theTable, $theField, $theValue, $whereClause='', $groupBy='', $orderBy='', $limit='', $useDeleteClause=TRUE)
static BEgetRootLine($uid, $clause='', $workspaceOL=FALSE)
static forceIntegerInRange($theInt, $min, $max=2000000000, $defaultValue=0)
static quoteJSvalue($value)
static workspaceOL($table, &$row, $wsid=-99, $unsetMovePointers=FALSE)
static intExplode($delimiter, $string, $removeEmptyValues=FALSE, $limit=0)
static cshItem($table, $field, $BACK_PATH, $wrap='', $onlyIconMode=FALSE, $styleAttrib='')
static canBeInterpretedAsInteger($var)
static getIndpEnv($getEnvName)
static getUrlToken($formName='securityToken', $tokenName='formToken')
static makeInstance($className)
static callUserFunction($funcName, &$params, &$ref, $checkPrefix='', $errorMode=0)
static viewOnClick($pageUid, $backPath='', $rootLine='', $anchorSection='', $alternativeUrl='', $additionalGetVars='', $switchFocus=TRUE)
static getRecordTitle($table, $row, $prep=FALSE, $forceResult=TRUE)
static wrapInHelp($table, $field, $text='', array $overloadHelpText=array())
static createVersionNumberedFilename($file, $forceQueryString=FALSE)
static getModuleData($MOD_MENU, $CHANGED_SETTINGS, $modName, $type='', $dontValidateList='', $setDefaultList='')
static isLoaded($key, $exitOnError=FALSE)
static versioningPlaceholderClause($table)
static isRecordLocked($table, $uid)
static getSpriteIcon($iconName, array $options=array(), array $overlays=array())
static getFuncMenu($mainParams, $elementName, $currentValue, $menuItems, $script='', $addparams='')
static unsetMenuItems($modTSconfig, $itemArray, $TSref)
static implodeArrayForUrl($name, array $theArray, $str='', $skipBlank=FALSE, $rawurlencodeParamName=FALSE)
static redirect($url, $httpStatus=self::HTTP_STATUS_303)
static fixed_lgd_cs($string, $chars, $appendString='...')
getNumberOfHiddenElements()
static sanitizeLocalUrl($url='')
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
static inList($list, $item)
getHeaderFlashMessagesForCurrentPid()
static BEenableFields($table, $inv=0)
static deleteClause($table, $tableAlias='')
static getLabelFromItemlist($table, $col, $key)