72 if (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'delete']) {
73 return ' AND ' . ($tableAlias ?: $table) .
'.' .
$GLOBALS[
'TCA'][$table][
'ctrl'][
'delete'] .
'=0';
93 static public function getRecord($table,
$uid, $fields =
'*', $where =
'', $useDeleteClause = TRUE) {
98 $where =
'uid=' . (int)
$uid . ($useDeleteClause ? self::deleteClause($table) :
'') . $where;
99 $row = $db->exec_SELECTgetSingleRow($fields, $table, $where);
118 static public function getRecordWSOL($table,
$uid, $fields =
'*', $where =
'', $useDeleteClause = TRUE, $unsetMovePointers = FALSE) {
119 if ($fields !==
'*') {
121 $row = self::getRecord($table,
$uid, $internalFields, $where, $useDeleteClause);
122 self::workspaceOL($table, $row, -99, $unsetMovePointers);
123 if (is_array($row)) {
124 foreach ($row as $key => $_) {
131 $row = self::getRecord($table,
$uid, $fields, $where, $useDeleteClause);
132 self::workspaceOL($table, $row, -99, $unsetMovePointers);
149 static public function getRecordRaw($table, $where =
'', $fields =
'*') {
151 if (FALSE !== ($res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery($fields, $table, $where,
'',
'',
'1'))) {
152 $row =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res);
153 $GLOBALS[
'TYPO3_DB']->sql_free_result($res);
173 static public function getRecordsByField($theTable, $theField, $theValue, $whereClause =
'', $groupBy =
'', $orderBy =
'', $limit =
'', $useDeleteClause = TRUE) {
174 if (is_array(
$GLOBALS[
'TCA'][$theTable])) {
175 $res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
178 $theField .
'=' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr($theValue, $theTable) .
179 ($useDeleteClause ? self::deleteClause($theTable) .
' ' :
'') .
180 self::versioningPlaceholderClause($theTable) .
' ' .
187 while ($row =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res)) {
190 $GLOBALS[
'TYPO3_DB']->sql_free_result($res);
205 list(
$uid, $table) = explode(
'_', strrev($str), 2);
206 return array(strrev($table), strrev(
$uid));
220 if ((
string) trim($in_list) !=
'') {
221 $tempItemArray = explode(
',', trim($in_list));
222 foreach ($tempItemArray as $key => $val) {
224 $parts = explode(
'_', $val, 2);
225 if ((
string) trim($parts[0]) !=
'') {
226 $theID = (int)strrev($parts[0]);
227 $theTable = trim($parts[1]) ? strrev(trim($parts[1])) : $default_tablename;
228 if ($theTable == $tablename) {
234 return implode(
',', $list);
248 $ctrl =
$GLOBALS[
'TCA'][$table][
'ctrl'];
251 if (is_array($ctrl)) {
252 if (is_array($ctrl[
'enablecolumns'])) {
253 if ($ctrl[
'enablecolumns'][
'disabled']) {
254 $field = $table .
'.' . $ctrl[
'enablecolumns'][
'disabled'];
255 $query[] = $field .
'=0';
256 $invQuery[] = $field .
'<>0';
258 if ($ctrl[
'enablecolumns'][
'starttime']) {
259 $field = $table .
'.' . $ctrl[
'enablecolumns'][
'starttime'];
260 $query[] =
'(' . $field .
'<=' .
$GLOBALS[
'SIM_ACCESS_TIME'] .
')';
261 $invQuery[] =
'(' . $field .
'<>0 AND ' . $field .
'>' .
$GLOBALS[
'SIM_ACCESS_TIME'] .
')';
263 if ($ctrl[
'enablecolumns'][
'endtime']) {
264 $field = $table .
'.' . $ctrl[
'enablecolumns'][
'endtime'];
265 $query[] =
'(' . $field .
'=0 OR ' . $field .
'>' .
$GLOBALS[
'SIM_ACCESS_TIME'] .
')';
266 $invQuery[] =
'(' . $field .
'<>0 AND ' . $field .
'<=' .
$GLOBALS[
'SIM_ACCESS_TIME'] .
')';
270 $outQ = $inv ?
'(' . implode(
' OR ', $invQuery) .
')' : implode(
' AND ', $query);
271 return $outQ ?
' AND ' . $outQ :
'';
284 $recordLocalization = FALSE;
285 if (self::isTableLocalizable($table)) {
286 $tcaCtrl =
$GLOBALS[
'TCA'][$table][
'ctrl'];
287 $recordLocalization = self::getRecordsByField($table, $tcaCtrl[
'transOrigPointerField'],
$uid,
'AND ' . $tcaCtrl[
'languageField'] .
'=' . (
int)$language . ($andWhereClause ?
' ' . $andWhereClause :
''),
'',
'',
'1');
289 return $recordLocalization;
308 static $BEgetRootLine_cache = array();
311 $ident = $pid .
'-' . $clause .
'-' . $workspaceOL;
312 if (is_array($BEgetRootLine_cache[$ident])) {
313 $output = $BEgetRootLine_cache[$ident];
316 $theRowArray = array();
317 while (
$uid != 0 && $loopCheck) {
319 $row = self::getPageForRootline(
$uid, $clause, $workspaceOL);
320 if (is_array($row)) {
322 $theRowArray[] = $row;
328 $theRowArray[] = array(
'uid' => 0,
'title' =>
'');
330 $c = count($theRowArray);
331 foreach ($theRowArray as $val) {
334 'uid' => $val[
'uid'],
335 'pid' => $val[
'pid'],
336 'title' => $val[
'title'],
337 'TSconfig' => $val[
'TSconfig'],
338 'is_siteroot' => $val[
'is_siteroot'],
339 'storage_pid' => $val[
'storage_pid'],
340 't3ver_oid' => $val[
't3ver_oid'],
341 't3ver_wsid' => $val[
't3ver_wsid'],
342 't3ver_state' => $val[
't3ver_state'],
343 't3ver_stage' => $val[
't3ver_stage'],
344 'backend_layout_next_level' => $val[
'backend_layout_next_level']
346 if (isset($val[
'_ORIG_pid'])) {
347 $output[$c][
'_ORIG_pid'] = $val[
'_ORIG_pid'];
350 $BEgetRootLine_cache[$ident] = $output;
365 static $getPageForRootline_cache = array();
366 $ident =
$uid .
'-' . $clause .
'-' . $workspaceOL;
367 if (is_array($getPageForRootline_cache[$ident])) {
368 $row = $getPageForRootline_cache[$ident];
370 $res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
'pid,uid,title,TSconfig,is_siteroot,storage_pid,t3ver_oid,t3ver_wsid,t3ver_state,t3ver_stage,backend_layout_next_level',
'pages',
'uid=' . (
int)
$uid .
' ' . self::deleteClause(
'pages') .
' ' . $clause);
371 $row =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res);
373 $newLocation = FALSE;
375 self::workspaceOL(
'pages', $row);
376 $newLocation = self::getMovePlaceholder(
'pages', $row[
'uid'],
'pid');
378 if (is_array($row)) {
379 if ($newLocation !== FALSE) {
380 $row[
'pid'] = $newLocation[
'pid'];
382 self::fixVersioningPid(
'pages', $row);
384 $getPageForRootline_cache[$ident] = $row;
387 $GLOBALS[
'TYPO3_DB']->sql_free_result($res);
401 if ($clearExpansion) {
402 $expandedPages = array();
404 $expandedPages = unserialize(
$GLOBALS[
'BE_USER']->uc[
'browseTrees'][
'browsePages']);
407 $rL = self::BEgetRootLine($pid);
410 $mountKeys = array_flip(
$GLOBALS[
'BE_USER']->returnWebmounts());
411 foreach ($rL as $rLDat) {
412 if (isset($mountKeys[$rLDat[
'uid']])) {
413 $mountIndex = $mountKeys[$rLDat[
'uid']];
418 foreach ($rL as $rLDat) {
419 $expandedPages[$mountIndex][$rLDat[
'uid']] = 1;
422 $GLOBALS[
'BE_USER']->uc[
'browseTrees'][
'browsePages'] = serialize($expandedPages);
442 $output = ($fullOutput =
'/');
443 $clause = trim($clause);
444 if ($clause !==
'' && substr($clause, 0, 3) !==
'AND') {
445 $clause =
'AND ' . $clause;
447 $data = self::BEgetRootLine(
$uid, $clause);
448 foreach ($data as $record) {
449 if ($record[
'uid'] === 0) {
453 if ($fullTitleLimit) {
457 if ($fullTitleLimit) {
458 return array($output, $fullOutput);
471 $finalExcludeArray = array();
474 $tableToTranslation = array();
476 foreach (
$GLOBALS[
'TCA'] as $table => $conf) {
477 $tableToTranslation[$table] =
$GLOBALS[
'LANG']->sl($conf[
'ctrl'][
'title']);
480 asort($tableToTranslation);
481 foreach ($tableToTranslation as $table => $translatedTable) {
482 $excludeArrayTable = array();
485 if (is_array(
$GLOBALS[
'TCA'][$table][
'columns'])
486 && empty(
$GLOBALS[
'TCA'][$table][
'ctrl'][
'adminOnly'])
487 && (empty(
$GLOBALS[
'TCA'][$table][
'ctrl'][
'rootLevel']) || !empty(
$GLOBALS[
'TCA'][$table][
'ctrl'][
'security'][
'ignoreRootLevelRestriction']))
489 foreach (
$GLOBALS[
'TCA'][$table][
'columns'] as $field => $_) {
490 if (
$GLOBALS[
'TCA'][$table][
'columns'][$field][
'exclude']) {
492 $translatedField =
$GLOBALS[
'LANG']->sl(
$GLOBALS[
'TCA'][$table][
'columns'][$field][
'label']);
494 $excludeArrayTable[] = array($translatedTable .
': ' . $translatedField, $table .
':' . $field);
499 $flexFormArray = static::getRegisteredFlexForms($table);
500 foreach ($flexFormArray as $tableField => $flexForms) {
503 if (!empty(
$GLOBALS[
'TCA'][$table][
'columns'][$tableField][
'label'])) {
504 $labelPrefix =
$GLOBALS[
'LANG']->sl(
$GLOBALS[
'TCA'][$table][
'columns'][$tableField][
'label']);
507 foreach ($flexForms as $extIdent =>
$extConf) {
510 foreach (
$extConf[
'ds'][
'sheets'] as $sheetName => $sheet) {
511 if (empty($sheet[
'ROOT'][
'el']) || !is_array($sheet[
'ROOT'][
'el'])) {
514 foreach ($sheet[
'ROOT'][
'el'] as $fieldName => $field) {
516 if (empty($field[
'TCEforms'][
'exclude'])) {
519 $fieldLabel = !empty($field[
'TCEforms'][
'label']) ?
$GLOBALS[
'LANG']->sl($field[
'TCEforms'][
'label']) : $fieldName;
520 $fieldIdent = $table .
':' . $tableField .
';' . $extIdent .
';' . $sheetName .
';' . $fieldName;
521 $excludeArrayTable[] = array(trim(($labelPrefix .
' ' . $extTitle),
': ') .
': ' . $fieldLabel, $fieldIdent);
527 if (count($excludeArrayTable) > 0) {
528 usort($excludeArrayTable, array(
'TYPO3\\CMS\\Backend\\Form\\FlexFormsHelper',
'compareArraysByFirstValue'));
529 $finalExcludeArray = array_merge($finalExcludeArray, $excludeArrayTable);
533 return $finalExcludeArray;
545 'ALLOW' =>
$GLOBALS[
'LANG']->sl(
'LLL:EXT:lang/locallang_core.xlf:labels.allow'),
546 'DENY' =>
$GLOBALS[
'LANG']->sl(
'LLL:EXT:lang/locallang_core.xlf:labels.deny')
549 $allowDenyOptions = array();
550 foreach (
$GLOBALS[
'TCA'] as $table => $_) {
552 if (is_array(
$GLOBALS[
'TCA'][$table][
'columns'])) {
553 foreach (
$GLOBALS[
'TCA'][$table][
'columns'] as $field => $_) {
554 $fCfg =
$GLOBALS[
'TCA'][$table][
'columns'][$field][
'config'];
555 if ($fCfg[
'type'] ==
'select' && $fCfg[
'authMode']) {
557 if (is_array($fCfg[
'items'])) {
559 $allowDenyOptions[$table .
':' . $field][
'tableFieldLabel'] =
$GLOBALS[
'LANG']->sl(
$GLOBALS[
'TCA'][$table][
'ctrl'][
'title']) .
': ' .
$GLOBALS[
'LANG']->sl(
$GLOBALS[
'TCA'][$table][
'columns'][$field][
'label']);
561 foreach ($fCfg[
'items'] as $iVal) {
563 if ((
string)$iVal[1] !==
'') {
566 switch ((
string) $fCfg[
'authMode']) {
567 case 'explicitAllow':
574 if ($iVal[4] ===
'EXPL_ALLOW') {
576 } elseif ($iVal[4] ===
'EXPL_DENY') {
583 $allowDenyOptions[$table .
':' . $field][
'items'][$iVal[1]] = array($iMode,
$GLOBALS[
'LANG']->sl($iVal[0]), $adLabel[$iMode]);
592 return $allowDenyOptions;
606 $languages =
GeneralUtility::makeInstance(
'TYPO3\\CMS\\Backend\\Configuration\\TranslationConfigurationProvider')->getSystemLanguages();
607 $sysLanguages = array();
608 foreach ($languages as $language) {
609 if ($language[
'uid'] !== -1) {
610 $sysLanguages[] = array(
611 0 => htmlspecialchars($language[
'title']) .
' [' . $language[
'uid'] .
']',
612 1 => $language[
'uid'],
613 2 => $language[
'flagIcon']
617 return $sysLanguages;
628 if (!empty(
$GLOBALS[
'TCA'][$table][
'ctrl'][
'transOrigPointerTable'])) {
629 $table =
$GLOBALS[
'TCA'][$table][
'ctrl'][
'transOrigPointerTable'];
642 $isLocalizable = FALSE;
643 if (isset(
$GLOBALS[
'TCA'][$table][
'ctrl']) && is_array(
$GLOBALS[
'TCA'][$table][
'ctrl'])) {
644 $tcaCtrl =
$GLOBALS[
'TCA'][$table][
'ctrl'];
645 $isLocalizable = isset($tcaCtrl[
'languageField']) && $tcaCtrl[
'languageField'] && isset($tcaCtrl[
'transOrigPointerField']) && $tcaCtrl[
'transOrigPointerField'];
647 return $isLocalizable;
660 $localizationMode = FALSE;
661 if (is_array($fieldOrConfig) && count($fieldOrConfig)) {
662 $config = $fieldOrConfig;
663 } elseif (is_string($fieldOrConfig) && isset(
$GLOBALS[
'TCA'][$table][
'columns'][$fieldOrConfig][
'config'])) {
664 $config =
$GLOBALS[
'TCA'][$table][
'columns'][$fieldOrConfig][
'config'];
666 if (is_array($config) && isset($config[
'type']) && $config[
'type'] ==
'inline' && self::isTableLocalizable($table)) {
667 $localizationMode = isset($config[
'behaviour'][
'localizationMode']) && $config[
'behaviour'][
'localizationMode'] ? $config[
'behaviour'][
'localizationMode'] :
'select';
669 if ($localizationMode ==
'select' && !self::isTableLocalizable($config[
'foreign_table'])) {
670 $localizationMode = FALSE;
673 return $localizationMode;
686 if ((
string) $id !=
'') {
689 if (
$GLOBALS[
'BE_USER']->isAdmin()) {
691 $pageinfo[
'_thePath'] = $path;
695 $pageinfo = self::getRecord(
'pages', $id,
'*', $perms_clause ?
' AND ' . $perms_clause :
'');
696 if ($pageinfo[
'uid'] &&
$GLOBALS[
'BE_USER']->isInWebMount($id, $perms_clause)) {
697 self::workspaceOL(
'pages', $pageinfo);
698 if (is_array($pageinfo)) {
699 self::fixVersioningPid(
'pages', $pageinfo);
700 list($pageinfo[
'_thePath'], $pageinfo[
'_thePathFull']) = self::getRecordPath((
int)$pageinfo[
'uid'], $perms_clause, 15, 1000);
717 static public function getTCAtypes($table, $rec, $useFieldNameAsKey = 0) {
720 $fieldValue = self::getTCAtypeValue($table, $rec);
721 $cacheIdentifier = $table .
'-type-' . $fieldValue .
'-fnk-' . $useFieldNameAsKey;
724 if (isset(self::$tcaTableTypeConfigurationCache[$cacheIdentifier])) {
725 return self::$tcaTableTypeConfigurationCache[$cacheIdentifier];
729 $typesConf =
$GLOBALS[
'TCA'][$table][
'types'][$fieldValue];
731 $fieldList = explode(
',', $typesConf[
'showitem']);
735 if (isset($typesConf[
'subtype_value_field'])) {
736 $subType = $rec[$typesConf[
'subtype_value_field']];
737 if (isset($typesConf[
'subtypes_addlist'][$subType])) {
739 $fieldList = array_merge($fieldList, $subFields);
743 $altFieldList = array();
745 foreach ($fieldList as $k => $v) {
747 $defaultExtras = is_array(
$GLOBALS[
'TCA'][$table][
'columns'][$pFieldName]) ?
$GLOBALS[
'TCA'][$table][
'columns'][$pFieldName][
'defaultExtras'] :
'';
748 $specConfParts = self::getSpecConfParts($pSpec, $defaultExtras);
749 $fieldList[$k] = array(
750 'field' => $pFieldName,
751 'title' => $pAltTitle,
752 'palette' => $pPalette,
753 'spec' => $specConfParts,
756 if ($useFieldNameAsKey) {
757 $altFieldList[$fieldList[$k][
'field']] = $fieldList[$k];
760 if ($useFieldNameAsKey) {
761 $fieldList = $altFieldList;
765 self::$tcaTableTypeConfigurationCache[$cacheIdentifier] = $fieldList;
791 $field =
$GLOBALS[
'TCA'][$table][
'ctrl'][
'type'];
792 if (strpos($field,
':') !== FALSE) {
793 list($pointerField, $foreignTableTypeField) = explode(
':', $field);
795 if (!isset($row[$pointerField])) {
796 $localRow = self::getRecord($table, $row[
'uid'], $pointerField);
797 $foreignUid = $localRow[$pointerField];
799 $foreignUid = $row[$pointerField];
802 $fieldConfig =
$GLOBALS[
'TCA'][$table][
'columns'][$pointerField][
'config'];
803 $relationType = $fieldConfig[
'type'];
804 if ($relationType ===
'select') {
805 $foreignTable = $fieldConfig[
'foreign_table'];
806 } elseif ($relationType ===
'group') {
807 $allowedTables = explode(
',', $fieldConfig[
'allowed']);
808 $foreignTable = $allowedTables[0];
810 throw new \RuntimeException(
'TCA foreign field pointer fields are only allowed to be used with group or select field types.', 1325862240);
812 $foreignRow = self::getRecord($foreignTable, $foreignUid, $foreignTableTypeField);
813 if ($foreignRow[$foreignTableTypeField]) {
814 $typeNum = $foreignRow[$foreignTableTypeField];
818 $typeNum = $row[$field];
821 if (empty($typeNum)) {
826 if (!
$GLOBALS[
'TCA'][$table][
'types'][$typeNum]) {
827 $typeNum =
$GLOBALS[
'TCA'][$table][
'types'][
'0'] ? 0 : 1;
830 $typeNum = (string) $typeNum;
847 if (count($specConfParts)) {
848 foreach ($specConfParts as $k2 => $v2) {
849 unset($specConfParts[$k2]);
850 if (preg_match(
'/(.*)\\[(.*)\\]/', $v2, $reg)) {
851 $specConfParts[trim($reg[1])] = array(
855 $specConfParts[trim($v2)] = 1;
859 $specConfParts = array();
861 return $specConfParts;
873 if (is_array($pArr)) {
874 foreach ($pArr as $k => $v) {
875 $parts = explode(
'=', $v, 2);
876 if (count($parts) == 2) {
877 $out[trim($parts[0])] = trim($parts[1]);
914 static public function getFlexFormDS($conf, $row, $table, $fieldName =
'', $WSOL = TRUE, $newRecordPidValue = 0) {
916 $ds_pointerField = $conf[
'ds_pointerField'];
917 $ds_array = $conf[
'ds'];
918 $ds_tableField = $conf[
'ds_tableField'];
919 $ds_searchParentField = $conf[
'ds_pointerField_searchParent'];
921 $dataStructArray =
'';
923 if (is_array($ds_array)) {
925 if ($ds_pointerField) {
929 if (count($pointerFields) == 2) {
930 if ($ds_array[$row[$pointerFields[0]] .
',' . $row[$pointerFields[1]]]) {
932 $srcPointer = $row[$pointerFields[0]] .
',' . $row[$pointerFields[1]];
933 } elseif ($ds_array[$row[$pointerFields[1]] .
',*']) {
935 $srcPointer = $row[$pointerFields[1]] .
',*';
936 } elseif ($ds_array[
'*,' . $row[$pointerFields[1]]]) {
938 $srcPointer =
'*,' . $row[$pointerFields[1]];
939 } elseif ($ds_array[$row[$pointerFields[0]]]) {
941 $srcPointer = $row[$pointerFields[0]];
944 $srcPointer = $row[$pointerFields[0]];
946 $srcPointer = isset($ds_array[$srcPointer]) ? $srcPointer :
'default';
948 $srcPointer =
'default';
951 if (substr($ds_array[$srcPointer], 0, 5) ==
'FILE:') {
953 if ($file && @is_file($file)) {
956 $dataStructArray =
'The file "' . substr($ds_array[$srcPointer], 5) .
'" in ds-array key "' . $srcPointer .
'" was not found ("' . $file .
'")';
961 } elseif ($ds_pointerField) {
964 $srcPointer = $row[$ds_pointerField];
966 if ($ds_searchParentField && !$srcPointer) {
967 $rr = self::getRecord($table, $row[
'uid'],
'uid,' . $ds_searchParentField);
970 self::workspaceOL($table, $rr);
971 self::fixVersioningPid($table, $rr, TRUE);
975 $subFieldPointer = $conf[
'ds_pointerField_searchParent_subField'];
976 while (!$srcPointer) {
977 $res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
'uid,' . $ds_pointerField .
',' . $ds_searchParentField . ($subFieldPointer ?
',' . $subFieldPointer :
''), $table,
'uid=' . (
int)($newRecordPidValue ?: $rr[$ds_searchParentField]) . self::deleteClause($table));
978 $newRecordPidValue = 0;
979 $rr =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res);
980 $GLOBALS[
'TYPO3_DB']->sql_free_result($res);
982 if (!is_array($rr) || isset($uidAcc[$rr[
'uid']])) {
985 $uidAcc[$rr[
'uid']] = 1;
987 self::workspaceOL($table, $rr);
988 self::fixVersioningPid($table, $rr, TRUE);
990 $srcPointer = $subFieldPointer && $rr[$subFieldPointer] ? $rr[$subFieldPointer] : $rr[$ds_pointerField];
997 list($tName, $fName) = explode(
':', $ds_tableField, 2);
998 if ($tName && $fName && is_array(
$GLOBALS[
'TCA'][$tName])) {
999 $dataStructRec = self::getRecord($tName, $srcPointer);
1001 self::workspaceOL($tName, $dataStructRec);
1003 if (strpos($dataStructRec[$fName],
'<') === FALSE) {
1004 if (is_file(PATH_site . $dataStructRec[$fName])) {
1008 $dataStructArray = sprintf(
'File \'%s\' was not found', $dataStructRec[$fName]);
1015 $dataStructArray =
'No tablename (' . $tName .
') or fieldname (' . $fName .
') was found an valid!';
1020 if ($file && @is_file($file)) {
1024 $dataStructArray =
'The file "' . $srcPointer .
'" was not found ("' . $file .
'")';
1029 $dataStructArray =
'No source value in fieldname "' . $ds_pointerField .
'"';
1032 $dataStructArray =
'No proper configuration!';
1035 if (is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_befunc.php'][
'getFlexFormDSClass'])) {
1036 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_befunc.php'][
'getFlexFormDSClass'] as $classRef) {
1038 if (method_exists($hookObj,
'getFlexFormDS_postProcessDS')) {
1039 $hookObj->getFlexFormDS_postProcessDS($dataStructArray, $conf, $row, $table, $fieldName);
1043 return $dataStructArray;
1054 if (empty($table) || empty(
$GLOBALS[
'TCA'][$table][
'columns'])) {
1057 $flexForms = array();
1058 foreach (
$GLOBALS[
'TCA'][$table][
'columns'] as $tableField => $fieldConf) {
1059 if (!empty($fieldConf[
'config'][
'type']) && !empty($fieldConf[
'config'][
'ds']) && $fieldConf[
'config'][
'type'] ==
'flex') {
1060 $flexForms[$tableField] = array();
1061 unset($fieldConf[
'config'][
'ds'][
'default']);
1063 $pointerFields = !empty($fieldConf[
'config'][
'ds_pointerField']) ? $fieldConf[
'config'][
'ds_pointerField'] :
'list_type,CType';
1066 foreach ($fieldConf[
'config'][
'ds'] as $flexFormKey => $dataStruct) {
1069 $extIdent = $identFields[0];
1070 if (!empty($identFields[1]) && $identFields[1] !=
'list' && $identFields[1] !=
'*') {
1071 $extIdent = $identFields[1];
1074 if (!is_array($dataStruct)) {
1076 if ($file && @is_file($file)) {
1080 if (!is_array($dataStruct)) {
1086 if (empty($dataStruct[
'sheets']) || !is_array($dataStruct[
'sheets'])) {
1092 foreach ($pointerFields as $pointerKey => $pointerName) {
1093 if (empty($keyFields[$pointerKey]) || $keyFields[$pointerKey] ==
'*' || $keyFields[$pointerKey] ==
'list') {
1096 if (!empty(
$GLOBALS[
'TCA'][$table][
'columns'][$pointerName][
'config'][
'items'])) {
1097 $items =
$GLOBALS[
'TCA'][$table][
'columns'][$pointerName][
'config'][
'items'];
1098 if (!is_array($items)) {
1101 foreach ($items as $itemConf) {
1102 if (!empty($itemConf[0]) && !empty($itemConf[1]) && $itemConf[1] == $keyFields[$pointerKey]) {
1103 $title = $itemConf[0];
1109 $flexForms[$tableField][$extIdent] = array(
1136 GeneralUtility::makeInstance(
'TYPO3\\CMS\\Core\\Cache\\CacheManager')->getCache(
'cache_hash')->set($hash, $data, array(
'ident_' . $ident), 0);
1149 static public function getHash($hash, $expTime = 0) {
1150 $hashContent = NULL;
1153 $hashContent = $cacheEntry;
1155 return $hashContent;
1173 static $pagesTSconfig_cacheReference = array();
1174 static $combinedTSconfig_cache = array();
1177 if ($returnPartArray === FALSE
1178 && $rootLine === NULL
1179 && isset($pagesTSconfig_cacheReference[$id])
1181 return $combinedTSconfig_cache[$pagesTSconfig_cacheReference[$id]];
1183 $TSconfig = array();
1184 if (!is_array($rootLine)) {
1185 $useCacheForCurrentPageId = TRUE;
1186 $rootLine = self::BEgetRootLine($id,
'', TRUE);
1188 $useCacheForCurrentPageId = FALSE;
1193 $TSdataArray = array();
1195 $TSdataArray[
'defaultPageTSconfig'] =
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'defaultPageTSconfig'];
1196 foreach ($rootLine as $k => $v) {
1197 $TSdataArray[
'uid_' . $v[
'uid']] = $v[
'TSconfig'];
1199 $TSdataArray = static::emitGetPagesTSconfigPreIncludeSignal($TSdataArray, $id, $rootLine, $returnPartArray);
1201 if ($returnPartArray) {
1202 return $TSdataArray;
1205 $pageTS = implode(LF .
'[GLOBAL]' . LF, $TSdataArray);
1208 $res = $parseObj->parseTSconfig($pageTS,
'PAGES', $id, $rootLine);
1210 $TSconfig = $res[
'TSconfig'];
1212 $cacheHash = $res[
'hash'];
1214 $userTSconfig =
$GLOBALS[
'BE_USER']->userTS[
'page.'];
1215 if (is_array($userTSconfig)) {
1217 $cacheHash .=
'_user' .
$GLOBALS[
'BE_USER']->user[
'uid'];
1220 if ($useCacheForCurrentPageId) {
1221 if (!isset($combinedTSconfig_cache[$cacheHash])) {
1222 $combinedTSconfig_cache[$cacheHash] = $TSconfig;
1224 $pagesTSconfig_cacheReference[$id] = $cacheHash;
1238 $implodeParams = array();
1240 foreach ($p as $kb => $val) {
1241 if (is_array($val)) {
1242 $implodeParams = array_merge($implodeParams, self::implodeTSParams($val, $k . $kb));
1244 $implodeParams[$k . $kb] = $val;
1248 return $implodeParams;
1264 static public function getUserNames($fields =
'username,usergroup,usergroup_cached_list,uid', $where =
'') {
1265 return self::getRecordsSortedByTitle(
1269 'AND pid=0 ' . $where
1281 return self::getRecordsSortedByTitle(
1285 'AND pid=0 ' . $where
1301 $fieldsIndex = array_flip($fields);
1303 $fieldsIndex[$titleField] = 1;
1306 $res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
'*', $table,
'1=1 ' . $where . self::deleteClause($table));
1307 while ($record =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res)) {
1309 $recordId = $record[
'uid'];
1310 $record[$titleField] = self::getRecordTitle($table, $record);
1313 $result[$recordId] = array_intersect_key($record, $fieldsIndex);
1315 $GLOBALS[
'TYPO3_DB']->sql_free_result($res);
1319 return \TYPO3\CMS\Core\Utility\ArrayUtility::sortArraysByKey(
$result, $titleField);
1330 $exQ =
' AND hide_in_lists=0';
1331 if (!
$GLOBALS[
'BE_USER']->isAdmin()) {
1332 $exQ .=
' AND uid IN (' . (
$GLOBALS[
'BE_USER']->user[
'usergroup_cached_list'] ?: 0) .
')';
1334 return self::getGroupNames($fields, $exQ);
1347 static public function blindUserNames($usernames, $groupArray, $excludeBlindedFlag = 0) {
1348 if (is_array($usernames) && is_array($groupArray)) {
1349 foreach ($usernames as
$uid => $row) {
1352 if ($row[
'uid'] !=
$GLOBALS[
'BE_USER']->user[
'uid']) {
1353 foreach ($groupArray as $v) {
1355 $userN = $row[
'username'];
1360 $userN = $row[
'username'];
1363 $usernames[
$uid][
'username'] = $userN;
1364 if ($excludeBlindedFlag && !$set) {
1365 unset($usernames[
$uid]);
1381 if (is_array($groups) && is_array($groupArray)) {
1382 foreach ($groups as
$uid => $row) {
1386 $groupN = $row[
'title'];
1389 $groups[
$uid][
'title'] = $groupN;
1390 if ($excludeBlindedFlag && !$set) {
1391 unset($groups[
$uid]);
1410 $delta_t = $tstamp -
$GLOBALS[
'EXEC_TIME'];
1411 return ceil($delta_t / (3600 * 24));
1420 static public function date($tstamp) {
1421 return date(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'ddmmyy'], (
int)$tstamp);
1431 return date(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'ddmmyy'] .
' ' .
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'hhmm'], $value);
1442 static public function time($value, $withSeconds = TRUE) {
1443 $hh = floor($value / 3600);
1444 $min = floor(($value - $hh * 3600) / 60);
1445 $sec = $value - $hh * 3600 - $min * 60;
1446 $l = sprintf(
'%02d', $hh) .
':' . sprintf(
'%02d', $min);
1448 $l .=
':' . sprintf(
'%02d', $sec);
1460 static public function calcAge($seconds, $labels =
' min| hrs| days| yrs| min| hour| day| year') {
1461 $labelArr = explode(
'|', $labels);
1462 $absSeconds = abs($seconds);
1463 $sign = $seconds < 0 ? -1 : 1;
1464 if ($absSeconds < 3600) {
1465 $val = round($absSeconds / 60);
1466 $seconds = $sign * $val . ($val == 1 ? $labelArr[4] : $labelArr[0]);
1467 } elseif ($absSeconds < 24 * 3600) {
1468 $val = round($absSeconds / 3600);
1469 $seconds = $sign * $val . ($val == 1 ? $labelArr[5] : $labelArr[1]);
1470 } elseif ($absSeconds < 365 * 24 * 3600) {
1471 $val = round($absSeconds / (24 * 3600));
1472 $seconds = $sign * $val . ($val == 1 ? $labelArr[6] : $labelArr[2]);
1474 $val = round($absSeconds / (365 * 24 * 3600));
1475 $seconds = $sign * $val . ($val == 1 ? $labelArr[7] : $labelArr[3]);
1489 static public function dateTimeAge($tstamp, $prefix = 1, $date =
'') {
1490 return $tstamp ? ($date ==
'date' ? self::date($tstamp) : self::datetime($tstamp)) .
' (' . self::calcAge($prefix * (
$GLOBALS[
'EXEC_TIME'] - $tstamp),
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')) .
')' :
'';
1501 $out .=
' alt="' . htmlspecialchars($content) .
'"';
1502 $out .=
' title="' . htmlspecialchars($content) .
'"';
1515 static public function resolveFileReferences($tableName, $fieldName, $element, $workspaceId = NULL) {
1516 if (empty(
$GLOBALS[
'TCA'][$tableName][
'columns'][$fieldName][
'config'])) {
1519 $configuration =
$GLOBALS[
'TCA'][$tableName][
'columns'][$fieldName][
'config'];
1520 if (empty($configuration[
'type']) || $configuration[
'type'] !==
'inline' 1521 || empty($configuration[
'foreign_table']) || $configuration[
'foreign_table'] !==
'sys_file_reference') {
1525 $fileReferences = array();
1528 if ($workspaceId !== NULL) {
1529 $relationHandler->setWorkspaceId($workspaceId);
1531 $relationHandler->start($element[$fieldName], $configuration[
'foreign_table'], $configuration[
'MM'], $element[
'uid'], $tableName, $configuration);
1532 $relationHandler->processDeletePlaceholder();
1533 $referenceUids = $relationHandler->tableArray[$configuration[
'foreign_table']];
1535 foreach ($referenceUids as $referenceUid) {
1538 $fileReferences[$fileReference->getUid()] = $fileReference;
1539 }
catch (\
TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException $e) {
1547 return $fileReferences;
1567 static public function thumbCode($row, $table, $field, $backPath, $thumbScript =
'', $uploaddir = NULL, $abs = 0, $tparams =
'', $size =
'', $linkInfoPopup = TRUE) {
1569 $sizeParts = array(64, 64);
1570 if ($size = trim($size)) {
1571 $sizeParts = explode(
'x', $size .
'x' . $size);
1572 if (!(
int)$sizeParts[0]) {
1577 $fileReferences = static::resolveFileReferences($table, $field, $row);
1579 if ($fileReferences !== NULL) {
1580 foreach ($fileReferences as $fileReferenceObject) {
1581 $fileObject = $fileReferenceObject->getOriginalFile();
1589 if ($fileObject->isMissing()) {
1590 $flashMessage = \TYPO3\CMS\Core\Resource\Utility\BackendUtility::getFlashMessageForMissingFile($fileObject);
1591 $thumbData .= $flashMessage->render();
1598 'width' => $sizeParts[0],
1599 'height' => $sizeParts[1]
1600 ))->getPublicUrl(TRUE);
1601 $imgTag =
'<img src="' . $imageUrl .
'" alt="' . htmlspecialchars($fileReferenceObject->getName()) .
'" />';
1606 if ($linkInfoPopup) {
1607 $onClick =
'top.launchView(\'_FILE\',\'' . $fileObject->getUid() .
'\',\
'' . $backPath .
'\');
return false;
'; 1608 $thumbData .= '<a href=
"#" onclick=
"' . htmlspecialchars($onClick) . '">
' . $imgTag . '</a>
'; 1610 $thumbData .= $imgTag; 1614 // Find uploaddir automatically 1615 if (is_null($uploaddir)) { 1616 $uploaddir = $GLOBALS['TCA
'][$table]['columns
'][$field]['config
']['uploadfolder
']; 1618 $uploaddir = rtrim($uploaddir, '/
'); 1620 $thumbs = GeneralUtility::trimExplode(',
', $row[$field], TRUE); 1622 foreach ($thumbs as $theFile) { 1624 $fileName = trim($uploaddir . '/
' . $theFile, '/
'); 1627 $fileObject = ResourceFactory::getInstance()->retrieveFileOrFolderObject($fileName); 1628 if ($fileObject->isMissing()) { 1629 $flashMessage = \TYPO3\CMS\Core\Resource\Utility\BackendUtility::getFlashMessageForMissingFile($fileObject); 1630 $thumbData .= $flashMessage->render(); 1633 } catch (\TYPO3\CMS\Core\Resource\Exception\ResourceDoesNotExistException $exception) { 1635 $flashMessage = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Messaging\
\FlashMessage', 1636 htmlspecialchars($exception->getMessage()), 1637 $GLOBALS['LANG
']->sL('LLL:EXT:lang/locallang_core.xlf:warning.file_missing
', TRUE), 1638 \TYPO3\CMS\Core\Messaging\FlashMessage::ERROR 1640 $thumbData .= $flashMessage->render(); 1644 $fileExtension = $fileObject->getExtension(); 1645 if ($fileExtension == 'ttf
' || GeneralUtility::inList($GLOBALS['TYPO3_CONF_VARS
']['GFX
']['imagefile_ext
'], $fileExtension)) { 1646 $imageUrl = $fileObject->process(ProcessedFile::CONTEXT_IMAGEPREVIEW, array( 1647 'width
' => $sizeParts[0], 1648 'height
' => $sizeParts[1] 1649 ))->getPublicUrl(TRUE); 1650 $image = '<img src=
"' . htmlspecialchars($imageUrl) . '" hspace=
"2" border=
"0" title=
"' . htmlspecialchars($fileObject->getName()) . '"' . $tparams . ' alt=
"" />
'; 1651 if ($linkInfoPopup) { 1652 $onClick = 'top.launchView(\
'_FILE\', \'' . $fileName .
'\',\
'\',\
'' . $backPath .
'\');
return false;
'; 1653 $thumbData .= '<a href=
"#" onclick=
"' . htmlspecialchars($onClick) . '">
' . $image . '</a>
'; 1655 $thumbData .= $image; 1659 $fileIcon = IconUtility::getSpriteIconForResource($fileObject, array('title
' => $fileObject->getName())); 1660 if ($linkInfoPopup) { 1661 $onClick = 'top.launchView(\
'_FILE\', \'' . $fileName .
'\',\
'\',\
'' . $backPath .
'\');
return false;
'; 1662 $thumbData .= '<a href=
"#" onclick=
"' . htmlspecialchars($onClick) . '">
' . $fileIcon . '</a>
'; 1664 $thumbData .= $fileIcon; 1682 static public function getThumbNail($thumbScript, $theFile, $tparams = '', $size = '') { 1683 $check = basename($theFile) . ':
' . filemtime($theFile) . ':
' . $GLOBALS['TYPO3_CONF_VARS
']['SYS
']['encryptionKey
']; 1684 $params = '&file=
' . rawurlencode($theFile); 1685 $params .= trim($size) ? '&size=
' . trim($size) : ''; 1686 $params .= '&md5sum=
' . md5($check); 1687 $url = $thumbScript . '?
' . $params; 1688 $th = '<img src=
"' . htmlspecialchars($url) . '" title=
"' . trim(basename($theFile)) . '"' . ($tparams ? ' ' . $tparams : '') . ' alt=
"" />
'; 1700 static public function titleAttribForPages($row, $perms_clause = '', $includeAttrib = 1) { 1702 $parts[] = 'id=
' . $row['uid
']; 1703 if ($row['alias
']) { 1704 $parts[] = $GLOBALS['LANG
']->sL($GLOBALS['TCA
']['pages
']['columns
']['alias
']['label
']) . ' ' . $row['alias
']; 1706 if ($row['pid
'] < 0) { 1707 $parts[] = 'v#1.
' . $row['t3ver_id
']; 1709 switch (VersionState::cast($row['t3ver_state
'])) { 1710 case new VersionState(VersionState::NEW_PLACEHOLDER): 1711 $parts[] = 'PLH WSID#
' . $row['t3ver_wsid
']; 1713 case new VersionState(VersionState::DELETE_PLACEHOLDER): 1714 $parts[] = 'Deleted element!
'; 1716 case new VersionState(VersionState::MOVE_PLACEHOLDER): 1717 $parts[] = 'NEW LOCATION (PLH) WSID#
' . $row['t3ver_wsid
']; 1719 case new VersionState(VersionState::MOVE_POINTER): 1720 $parts[] = 'OLD LOCATION (PNT) WSID#
' . $row['t3ver_wsid
']; 1722 case new VersionState(VersionState::NEW_PLACEHOLDER_VERSION): 1723 $parts[] = 'New element!
'; 1726 if ($row['doktype
'] == PageRepository::DOKTYPE_LINK) { 1727 $parts[] = $GLOBALS['LANG
']->sL($GLOBALS['TCA
']['pages
']['columns
']['url
']['label
']) . ' ' . $row['url
']; 1728 } elseif ($row['doktype
'] == PageRepository::DOKTYPE_SHORTCUT) { 1729 if ($perms_clause) { 1730 $label = self::getRecordPath((int)$row['shortcut
'], $perms_clause, 20); 1732 $row['shortcut
'] = (int)$row['shortcut
']; 1733 $lRec = self::getRecordWSOL('pages
', $row['shortcut
'], 'title
'); 1734 $label = $lRec['title
'] . ' (
id=
' . $row['shortcut
'] . ')
'; 1736 if ($row['shortcut_mode
'] != PageRepository::SHORTCUT_MODE_NONE) { 1737 $label .= ',
' . $GLOBALS['LANG
']->sL($GLOBALS['TCA
']['pages
']['columns
']['shortcut_mode
']['label
']) . ' ' . $GLOBALS['LANG
']->sL(self::getLabelFromItemlist('pages
', 'shortcut_mode
', $row['shortcut_mode
'])); 1739 $parts[] = $GLOBALS['LANG
']->sL($GLOBALS['TCA
']['pages
']['columns
']['shortcut
']['label
']) . ' ' . $label; 1740 } elseif ($row['doktype
'] == PageRepository::DOKTYPE_MOUNTPOINT) { 1741 if ($perms_clause) { 1742 $label = self::getRecordPath((int)$row['mount_pid
'], $perms_clause, 20); 1744 $lRec = self::getRecordWSOL('pages
', (int)$row['mount_pid
'], 'title
'); 1745 $label = $lRec['title
'] . ' (
id=
' . $row['mount_pid
'] . ')
'; 1747 $parts[] = $GLOBALS['LANG
']->sL($GLOBALS['TCA
']['pages
']['columns
']['mount_pid
']['label
']) . ' ' . $label; 1748 if ($row['mount_pid_ol
']) { 1749 $parts[] = $GLOBALS['LANG
']->sL($GLOBALS['TCA
']['pages
']['columns
']['mount_pid_ol
']['label
']); 1752 if ($row['nav_hide
']) { 1753 $parts[] = rtrim($GLOBALS['LANG
']->sL($GLOBALS['TCA
']['pages
']['columns
']['nav_hide
']['label
']), ':
'); 1755 if ($row['hidden
']) { 1756 $parts[] = $GLOBALS['LANG
']->sL('LLL:EXT:lang/locallang_core.xlf:labels.hidden
'); 1758 if ($row['starttime
']) { 1759 $parts[] = $GLOBALS['LANG
']->sL($GLOBALS['TCA
']['pages
']['columns
']['starttime
']['label
']) . ' ' . self::dateTimeAge($row['starttime
'], -1, 'date'); 1761 if ($row['endtime
']) { 1762 $parts[] = $GLOBALS['LANG
']->sL($GLOBALS['TCA
']['pages
']['columns
']['endtime
']['label
']) . ' ' . self::dateTimeAge($row['endtime
'], -1, 'date'); 1764 if ($row['fe_group
']) { 1765 $fe_groups = array(); 1766 foreach (GeneralUtility::intExplode(',
', $row['fe_group
']) as $fe_group) { 1767 if ($fe_group < 0) { 1768 $fe_groups[] = $GLOBALS['LANG
']->sL(self::getLabelFromItemlist('pages
', 'fe_group
', $fe_group)); 1770 $lRec = self::getRecordWSOL('fe_groups
', $fe_group, 'title
'); 1771 $fe_groups[] = $lRec['title
']; 1774 $label = implode(',
', $fe_groups); 1775 $parts[] = $GLOBALS['LANG
']->sL($GLOBALS['TCA
']['pages
']['columns
']['fe_group
']['label
']) . ' ' . $label; 1777 $out = htmlspecialchars(implode(' -
', $parts)); 1778 return $includeAttrib ? 'title=
"' . $out . '"' : $out; 1790 static public function getRecordIconAltText($row, $table = 'pages
') { 1791 if ($table == 'pages
') { 1792 $out = self::titleAttribForPages($row, '', 0); 1794 $ctrl = $GLOBALS['TCA
'][$table]['ctrl
']['enablecolumns
']; 1796 $out = 'id=
' . $row['uid
']; 1797 if ($table == 'pages
' && $row['alias
']) { 1798 $out .= ' /
' . $row['alias
']; 1800 if ($GLOBALS['TCA
'][$table]['ctrl
']['versioningWS
'] && $row['pid
'] < 0) { 1801 $out .= ' - v#1.
' . $row['t3ver_id
']; 1803 if ($GLOBALS['TCA
'][$table]['ctrl
']['versioningWS
']) { 1804 switch (VersionState::cast($row['t3ver_state
'])) { 1805 case new VersionState(VersionState::NEW_PLACEHOLDER): 1806 $out .= ' - PLH WSID#
' . $row['t3ver_wsid
']; 1808 case new VersionState(VersionState::DELETE_PLACEHOLDER): 1809 $out .= ' - Deleted element!
'; 1811 case new VersionState(VersionState::MOVE_PLACEHOLDER): 1812 $out .= ' - NEW LOCATION (PLH) WSID#
' . $row['t3ver_wsid
']; 1814 case new VersionState(VersionState::MOVE_POINTER): 1815 $out .= ' - OLD LOCATION (PNT) WSID#
' . $row['t3ver_wsid
']; 1817 case new VersionState(VersionState::NEW_PLACEHOLDER_VERSION): 1818 $out .= ' - New element!
'; 1823 if ($ctrl['disabled
']) { 1824 $out .= $row[$ctrl['disabled
']] ? ' -
' . $GLOBALS['LANG
']->sL('LLL:EXT:lang/locallang_core.xlf:labels.hidden
') : ''; 1826 if ($ctrl['starttime
']) { 1827 if ($row[$ctrl['starttime
']] > $GLOBALS['EXEC_TIME
']) { 1828 $out .= ' -
' . $GLOBALS['LANG
']->sL('LLL:EXT:lang/locallang_core.xlf:labels.starttime
') . ':
' . self::date($row[$ctrl['starttime
']]) . ' (
' . self::daysUntil($row[$ctrl['starttime
']]) . ' ' . $GLOBALS['LANG
']->sL('LLL:EXT:lang/locallang_core.xlf:labels.days
') . ')
'; 1831 if ($row[$ctrl['endtime
']]) { 1832 $out .= ' -
' . $GLOBALS['LANG
']->sL('LLL:EXT:lang/locallang_core.xlf:labels.endtime
') . ':
' . self::date($row[$ctrl['endtime
']]) . ' (
' . self::daysUntil($row[$ctrl['endtime
']]) . ' ' . $GLOBALS['LANG
']->sL('LLL:EXT:lang/locallang_core.xlf:labels.days
') . ')
'; 1835 return htmlspecialchars($out); 1846 static public function getLabelFromItemlist($table, $col, $key) { 1847 // Check, if there is an "items" array: 1848 if (is_array($GLOBALS['TCA
'][$table]) && is_array($GLOBALS['TCA
'][$table]['columns
'][$col]) && is_array($GLOBALS['TCA
'][$table]['columns
'][$col]['config
']['items
'])) { 1849 // Traverse the items-array... 1850 foreach ($GLOBALS['TCA
'][$table]['columns
'][$col]['config
']['items
'] as $k => $v) { 1851 // ... and return the first found label where the value was equal to $key 1852 if ((string)$v[1] === (string)$key) { 1868 static public function getLabelFromItemListMerged($pageId, $table, $column, $key) { 1869 $pageTsConfig = static::getPagesTSconfig($pageId); 1871 if (is_array($pageTsConfig['TCEFORM.
']) && is_array($pageTsConfig['TCEFORM.
'][$table . '.
']) && is_array($pageTsConfig['TCEFORM.
'][$table . '.
'][$column . '.
'])) { 1872 if (is_array($pageTsConfig['TCEFORM.
'][$table . '.
'][$column . '.
']['addItems.
']) && isset($pageTsConfig['TCEFORM.
'][$table . '.
'][$column . '.
']['addItems.
'][$key])) { 1873 $label = $pageTsConfig['TCEFORM.
'][$table . '.
'][$column . '.
']['addItems.
'][$key]; 1874 } elseif (is_array($pageTsConfig['TCEFORM.
'][$table . '.
'][$column . '.
']['altLabels.
']) && isset($pageTsConfig['TCEFORM.
'][$table . '.
'][$column . '.
']['altLabels.
'][$key])) { 1875 $label = $pageTsConfig['TCEFORM.
'][$table . '.
'][$column . '.
']['altLabels.
'][$key]; 1878 if (empty($label)) { 1879 $tcaValue = self::getLabelFromItemlist($table, $column, $key); 1880 if (!empty($tcaValue)) { 1896 static public function getLabelsFromItemsList($table, $column, $key) { 1898 $values = GeneralUtility::trimExplode(',
', $key, TRUE); 1899 if (count($values) > 0) { 1900 // Check if there is an "items" array 1901 if (is_array($GLOBALS['TCA
'][$table]) && is_array($GLOBALS['TCA
'][$table]['columns
'][$column]) && is_array($GLOBALS['TCA
'][$table]['columns
'][$column]['config
']['items
'])) { 1902 // Loop on all selected values 1903 foreach ($values as $aValue) { 1904 foreach ($GLOBALS['TCA
'][$table]['columns
'][$column]['config
']['items
'] as $itemConfiguration) { 1905 // Loop on all available items 1906 // Keep matches and move on to next value 1907 if ((string)$aValue === (string)$itemConfiguration[1]) { 1908 $labels[] = $GLOBALS['LANG
']->sL($itemConfiguration[0]); 1915 return implode(',
', $labels); 1927 static public function getItemLabel($table, $col, $printAllWrap = '') { 1928 // Check if column exists 1929 if (is_array($GLOBALS['TCA
'][$table]) && is_array($GLOBALS['TCA
'][$table]['columns
'][$col])) { 1930 return $GLOBALS['TCA
'][$table]['columns
'][$col]['label
']; 1932 if ($printAllWrap) { 1933 GeneralUtility::deprecationLog('The third parameter of
getItemLabel() is deprecated with
TYPO3 CMS 6.2 and will be removed two versions later.');
1934 $parts = explode('|', $printAllWrap);
1935 return $parts[0] . $col . $parts[1];
1950 $originalUidField = isset(
$GLOBALS[
'TCA'][$table][
'ctrl'][
'transOrigPointerField'])
1951 ?
$GLOBALS[
'TCA'][$table][
'ctrl'][
'transOrigPointerField']
1953 if (empty($row[$originalUidField])) {
1957 $originalTable = self::getOriginalTranslationTable($table);
1958 $originalRow = self::getRecord($originalTable, $row[$originalUidField]);
1959 foreach ($row as $field => $_) {
1960 $l10n_mode = isset(
$GLOBALS[
'TCA'][$originalTable][
'columns'][$field][
'l10n_mode'])
1961 ?
$GLOBALS[
'TCA'][$originalTable][
'columns'][$field][
'l10n_mode']
1963 if ($l10n_mode ===
'exclude' || ($l10n_mode ===
'mergeIfNotBlank' && trim($row[$field]) ===
'')) {
1964 $row[$field] = $originalRow[$field];
1980 static public function getRecordTitle($table, $row, $prep = FALSE, $forceResult = TRUE) {
1981 if (is_array(
$GLOBALS[
'TCA'][$table])) {
1983 if (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'label_userFunc']) {
1984 $params[
'table'] = $table;
1985 $params[
'row'] = $row;
1986 $params[
'title'] =
'';
1987 $params[
'options'] = isset(
$GLOBALS[
'TCA'][$table][
'ctrl'][
'label_userFunc_options']) ?
$GLOBALS[
'TCA'][$table][
'ctrl'][
'label_userFunc_options'] : array();
1992 $t = $params[
'title'];
1994 if (is_array($row)) {
1995 $row = self::replaceL10nModeFields($table, $row);
1999 $t = self::getProcessedValue($table,
$GLOBALS[
'TCA'][$table][
'ctrl'][
'label'], $row[
$GLOBALS[
'TCA'][$table][
'ctrl'][
'label']], 0, 0, FALSE, $row[
'uid'], $forceResult);
2000 if (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'label_alt'] && (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'label_alt_force'] || (
string)$t ===
'')) {
2006 foreach ($altFields as $fN) {
2007 $t = trim(strip_tags($row[$fN]));
2008 if ((
string)$t !==
'') {
2009 $t = self::getProcessedValue($table, $fN, $t, 0, 0, FALSE, $row[
'uid']);
2010 if (!
$GLOBALS[
'TCA'][$table][
'ctrl'][
'label_alt_force']) {
2016 if (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'label_alt_force']) {
2017 $t = implode(
', ', $tA);
2022 if ($prep || $forceResult) {
2024 $t = self::getRecordTitlePrep($t);
2026 if (trim($t) ===
'') {
2027 $t = self::getNoRecordTitle($prep);
2045 $titleLength =
$GLOBALS[
'BE_USER']->uc[
'titleLen'];
2047 $titleOrig = htmlspecialchars($title);
2050 if ($titleOrig != $title) {
2051 $title =
'<span title="' . $titleOrig .
'">' . $title .
'</span>';
2063 $noTitle =
'[' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.no_title', TRUE) .
']';
2065 $noTitle =
'<em>' . $noTitle .
'</em>';
2086 static public function getProcessedValue($table, $col, $value, $fixed_lgd_chars = 0, $defaultPassthrough = 0, $noRecordLookup = FALSE,
$uid = 0, $forceResult = TRUE) {
2087 if ($col ==
'uid') {
2092 if (is_array(
$GLOBALS[
'TCA'][$table]) && is_array(
$GLOBALS[
'TCA'][$table][
'columns'][$col])) {
2094 $theColConf =
$GLOBALS[
'TCA'][$table][
'columns'][$col][
'config'];
2098 if (is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_befunc.php'][
'preProcessValue'])) {
2101 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_befunc.php'][
'preProcessValue'] as $_funcRef) {
2106 switch ((
string) $theColConf[
'type']) {
2108 $l = self::getLabelFromItemlist($table, $col, $value);
2113 if ($theColConf[
'MM']) {
2116 if ($noRecordLookup) {
2117 $MMfield = $theColConf[
'foreign_table'] .
'.uid';
2119 $MMfields = array($theColConf[
'foreign_table'] .
'.' .
$GLOBALS[
'TCA'][$theColConf[
'foreign_table']][
'ctrl'][
'label']);
2121 $MMfields[] = $theColConf[
'foreign_table'] .
'.' . $f;
2123 $MMfield = join(
',', $MMfields);
2127 $dbGroup->start($value, $theColConf[
'foreign_table'], $theColConf[
'MM'],
$uid, $table, $theColConf);
2128 $selectUids = $dbGroup->tableArray[$theColConf[
'foreign_table']];
2129 if (is_array($selectUids) && count($selectUids) > 0) {
2130 $MMres =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
'uid, ' . $MMfield, $theColConf[
'foreign_table'],
'uid IN (' . implode(
',', $selectUids) .
')' . self::deleteClause($theColConf[
'foreign_table']));
2132 while ($MMrow =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($MMres)) {
2134 $mmlA[array_search($MMrow[
'uid'], $selectUids)] = $noRecordLookup ?
2136 static::getRecordTitle($theColConf[
'foreign_table'], $MMrow, FALSE, $forceResult);
2138 $GLOBALS[
'TYPO3_DB']->sql_free_result($MMres);
2139 if (!empty($mmlA)) {
2141 $l = implode(
'; ', $mmlA);
2152 $l = self::getLabelsFromItemsList($table, $col, $value);
2153 if ($theColConf[
'foreign_table'] && !$l &&
$GLOBALS[
'TCA'][$theColConf[
'foreign_table']]) {
2154 if ($noRecordLookup) {
2158 if (
$uid && isset($theColConf[
'foreign_field']) && $theColConf[
'foreign_field'] !==
'') {
2160 if (!empty($theColConf[
'foreign_table_field'])) {
2161 $whereClause .=
' AND ' . $theColConf[
'foreign_table_field'] .
' = ' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr($table, $theColConf[
'foreign_table']);
2164 $foreignMatchFields = is_array($theColConf[
'foreign_match_fields']) ? $theColConf[
'foreign_match_fields'] : array();
2165 foreach ($foreignMatchFields as $matchField => $matchValue) {
2166 $whereClause .=
' AND ' . $matchField .
'=' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr($matchValue, $theColConf[
'foreign_table']);
2168 $records = self::getRecordsByField($theColConf[
'foreign_table'], $theColConf[
'foreign_field'],
$uid, $whereClause);
2169 if (!empty($records)) {
2170 foreach ($records as $record) {
2171 $rParts[] = $record[
'uid'];
2175 if (empty($rParts)) {
2179 foreach ($rParts as $rVal) {
2182 $r = self::getRecordWSOL($theColConf[
'foreign_table'], $rVal);
2184 $r = self::getRecordWSOL($theColConf[
'neg_foreign_table'], -$rVal);
2187 $lA[] =
$GLOBALS[
'LANG']->sL(($rVal > 0 ? $theColConf[
'foreign_table_prefix'] : $theColConf[
'neg_foreign_table_prefix'])) . self::getRecordTitle(($rVal > 0 ? $theColConf[
'foreign_table'] : $theColConf[
'neg_foreign_table']), $r, FALSE, $forceResult);
2189 $lA[] = $rVal ?
'[' . $rVal .
'!]' :
'';
2192 $l = implode(
', ', $lA);
2195 if (empty($l) && !empty($value)) {
2203 if ($theColConf[
'internal_type'] ===
'db') {
2204 if ($theColConf[
'MM']) {
2207 if ($noRecordLookup) {
2208 $MMfield = $theColConf[
'foreign_table'] .
'.uid';
2210 $MMfields = array($theColConf[
'foreign_table'] .
'.' .
$GLOBALS[
'TCA'][$theColConf[
'foreign_table']][
'ctrl'][
'label']);
2211 $altLabelFields = explode(
',',
$GLOBALS[
'TCA'][$theColConf[
'foreign_table']][
'ctrl'][
'label_alt']);
2212 foreach ($altLabelFields as $f) {
2215 $MMfields[] = $theColConf[
'foreign_table'] .
'.' . $f;
2218 $MMfield = join(
',', $MMfields);
2222 $dbGroup->start($value, $theColConf[
'foreign_table'], $theColConf[
'MM'],
$uid, $table, $theColConf);
2223 $selectUids = $dbGroup->tableArray[$theColConf[
'foreign_table']];
2224 if (!empty($selectUids) && is_array($selectUids)) {
2225 $MMres =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
2227 $theColConf[
'foreign_table'],
2228 'uid IN (' . implode(
',', $selectUids) .
')' . static::deleteClause($theColConf[
'foreign_table'])
2231 while ($MMrow =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($MMres)) {
2233 $mmlA[array_search($MMrow[
'uid'], $selectUids)] = $noRecordLookup
2235 : static::getRecordTitle($theColConf[
'foreign_table'], $MMrow, FALSE, $forceResult);
2237 $GLOBALS[
'TYPO3_DB']->sql_free_result($MMres);
2238 if (!empty($mmlA)) {
2240 $l = implode(
'; ', $mmlA);
2251 $finalValues = array();
2252 $relationTableName = $theColConf[
'allowed'];
2255 foreach ($explodedValues as $explodedValue) {
2258 $relationTableNameForField = $relationTableName;
2260 list($relationTableNameForField, $explodedValue) = self::splitTable_Uid($explodedValue);
2263 $relationRecord = static::getRecordWSOL($relationTableNameForField, $explodedValue);
2264 $finalValues[] = static::getRecordTitle($relationTableNameForField, $relationRecord);
2267 $l = implode(
', ', $finalValues);
2274 if (!is_array($theColConf[
'items']) || count($theColConf[
'items']) == 1) {
2275 $l = $value ?
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_common.xlf:yes') :
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_common.xlf:no');
2278 foreach ($theColConf[
'items'] as $key => $val) {
2279 if ($value & pow(2, $key)) {
2280 $lA[] =
$GLOBALS[
'LANG']->sL($val[0]);
2283 $l = implode(
', ', $lA);
2288 if (isset($value)) {
2291 if (isset($theColConf[
'dbType']) && $theColConf[
'dbType'] ===
'date') {
2292 $dateTimeFormats =
$GLOBALS[
'TYPO3_DB']->getDateTimeFormats($table);
2293 $emptyValue = $dateTimeFormats[
'date'][
'empty'];
2294 $value = $value !== $emptyValue ? strtotime($value) : 0;
2296 if (!empty($value)) {
2297 $l = self::date($value) .
' (' . (
$GLOBALS[
'EXEC_TIME'] - $value > 0 ?
'-' :
'') . self::calcAge(abs((
$GLOBALS[
'EXEC_TIME'] - $value)),
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')) .
')';
2300 if (!empty($value)) {
2301 $l = self::time($value, FALSE);
2304 if (!empty($value)) {
2305 $l = self::time($value);
2309 if (isset($theColConf[
'dbType']) && $theColConf[
'dbType'] ===
'datetime') {
2310 $dateTimeFormats =
$GLOBALS[
'TYPO3_DB']->getDateTimeFormats($table);
2311 $emptyValue = $dateTimeFormats[
'datetime'][
'empty'];
2312 $value = $value !== $emptyValue ? strtotime($value) : 0;
2314 if (!empty($value)) {
2315 $l = self::datetime($value);
2323 $l = strip_tags($value);
2326 if ($defaultPassthrough) {
2328 } elseif ($theColConf[
'MM']) {
2335 if (stristr($theColConf[
'eval'],
'password')) {
2337 $randomNumber = rand(5, 12);
2338 for ($i = 0; $i < $randomNumber; $i++) {
2345 if (is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_befunc.php'][
'postProcessValue'])) {
2348 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_befunc.php'][
'postProcessValue'] as $_funcRef) {
2351 'colConf' => $theColConf
2356 if ($fixed_lgd_chars) {
2377 $fVnew = self::getProcessedValue($table, $fN, $fV, $fixed_lgd_chars, 1, 0,
$uid, $forceResult);
2378 if (!isset($fVnew)) {
2379 if (is_array(
$GLOBALS[
'TCA'][$table])) {
2380 if ($fN ==
$GLOBALS[
'TCA'][$table][
'ctrl'][
'tstamp'] || $fN ==
$GLOBALS[
'TCA'][$table][
'ctrl'][
'crdate']) {
2381 $fVnew = self::datetime($fV);
2382 } elseif ($fN ==
'pid') {
2384 $fVnew = self::getRecordPath($fV,
'1=1', 20);
2414 $fields[] = $prefix .
'uid';
2415 if (isset(
$GLOBALS[
'TCA'][$table][
'ctrl'][
'label']) &&
$GLOBALS[
'TCA'][$table][
'ctrl'][
'label'] !=
'') {
2416 $fields[] = $prefix .
$GLOBALS[
'TCA'][$table][
'ctrl'][
'label'];
2418 if (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'label_alt']) {
2420 foreach ($secondFields as $fieldN) {
2421 $fields[] = $prefix . $fieldN;
2424 if (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'versioningWS']) {
2425 $fields[] = $prefix .
't3ver_id';
2426 $fields[] = $prefix .
't3ver_state';
2427 $fields[] = $prefix .
't3ver_wsid';
2428 $fields[] = $prefix .
't3ver_count';
2430 if (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'selicon_field']) {
2431 $fields[] = $prefix .
$GLOBALS[
'TCA'][$table][
'ctrl'][
'selicon_field'];
2433 if (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'typeicon_column']) {
2434 $fields[] = $prefix .
$GLOBALS[
'TCA'][$table][
'ctrl'][
'typeicon_column'];
2436 if (is_array(
$GLOBALS[
'TCA'][$table][
'ctrl'][
'enablecolumns'])) {
2437 if (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'enablecolumns'][
'disabled']) {
2438 $fields[] = $prefix .
$GLOBALS[
'TCA'][$table][
'ctrl'][
'enablecolumns'][
'disabled'];
2440 if (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'enablecolumns'][
'starttime']) {
2441 $fields[] = $prefix .
$GLOBALS[
'TCA'][$table][
'ctrl'][
'enablecolumns'][
'starttime'];
2443 if (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'enablecolumns'][
'endtime']) {
2444 $fields[] = $prefix .
$GLOBALS[
'TCA'][$table][
'ctrl'][
'enablecolumns'][
'endtime'];
2446 if (
$GLOBALS[
'TCA'][$table][
'ctrl'][
'enablecolumns'][
'fe_group']) {
2447 $fields[] = $prefix .
$GLOBALS[
'TCA'][$table][
'ctrl'][
'enablecolumns'][
'fe_group'];
2450 return implode(
',', array_unique($fields));
2466 $params = $defaults;
2467 if (is_array($configArray)) {
2469 foreach ($configArray as $fname => $config) {
2470 if (is_array($config)) {
2471 $lines[$fname] =
'<strong>' . htmlspecialchars($config[1]) .
'</strong><br />';
2472 $lines[$fname] .= $config[2] .
'<br />';
2473 switch ($config[0]) {
2477 $formEl =
'<input type="text" name="' . $dataPrefix .
'[' . $fname .
']" value="' . $params[$fname] .
'"' .
$GLOBALS[
'TBE_TEMPLATE']->formWidth(($config[0] ==
'short' ? 24 : 48)) .
' />';
2480 $formEl =
'<input type="hidden" name="' . $dataPrefix .
'[' . $fname .
']" value="0" /><input type="checkbox" name="' . $dataPrefix .
'[' . $fname .
']" value="1"' . ($params[$fname] ?
' checked="checked"' :
'') .
' />';
2487 foreach ($config[3] as $k => $v) {
2488 $opt[] =
'<option value="' . htmlspecialchars($k) .
'"' . ($params[$fname] == $k ?
' selected="selected"' :
'') .
'>' . htmlspecialchars($v) .
'</option>';
2490 $formEl =
'<select name="' . $dataPrefix .
'[' . $fname .
']">' . implode(
'', $opt) .
'</select>';
2495 $lines[$fname] .= $formEl;
2496 $lines[$fname] .=
'<br /><br />';
2498 $lines[$fname] =
'<hr />';
2500 $lines[$fname] .=
'<strong>' . strtoupper(htmlspecialchars($config)) .
'</strong><br />';
2503 $lines[$fname] .=
'<br />';
2508 $out = implode(
'', $lines);
2509 $out .=
'<input type="submit" name="submit" value="Update configuration" />';
2535 if (is_array(
$GLOBALS[
'TCA_DESCR'][$table]) && is_array(
$GLOBALS[
'TCA_DESCR'][$table][
'columns'][$field]) && (isset(
$GLOBALS[
'BE_USER']->uc[
'edit_showFieldHelp']) || $force)) {
2536 return self::wrapInHelp($table, $field);
2548 if (!isset(
$GLOBALS[
'TCA_DESCR'][$table][
'columns'])) {
2549 $GLOBALS[
'LANG']->loadSingleTableDescription($table);
2552 'description' => NULL,
2556 if (is_array(
$GLOBALS[
'TCA_DESCR'][$table]) && is_array(
$GLOBALS[
'TCA_DESCR'][$table][
'columns'][$field])) {
2557 $data =
$GLOBALS[
'TCA_DESCR'][$table][
'columns'][$field];
2559 if ($data[
'alttitle']) {
2560 $output[
'title'] = $data[
'alttitle'];
2563 if ($data[
'image_descr'] || $data[
'seeAlso'] || $data[
'details'] || $data[
'syntax']) {
2564 $output[
'moreInfo'] = TRUE;
2567 if ($data[
'description']) {
2568 $output[
'description'] = $data[
'description'];
2583 $helpTextArray = self::helpTextArray($table, $field);
2587 if ($helpTextArray[
'title'] !== NULL) {
2588 $output .=
'<h2 class="t3-row-header">' . $helpTextArray[
'title'] .
'</h2>';
2591 if ($helpTextArray[
'moreInfo']) {
2595 if ($helpTextArray[
'description'] !== NULL || $arrow) {
2596 $output .=
'<p class="t3-help-short">' . nl2br(htmlspecialchars($helpTextArray[
'description'])) . $arrow .
'</p>';
2613 static public function wrapInHelp($table, $field, $text =
'', array $overloadHelpText = array()) {
2617 $wrappedText = $text;
2618 $hasHelpTextOverload = count($overloadHelpText) > 0;
2620 if (!$hasHelpTextOverload) {
2621 $helpText = self::helpText($table, $field);
2624 if (!empty($helpText) || $hasHelpTextOverload) {
2628 $abbrClassAdd =
'-icon';
2630 $text =
'<abbr class="t3-help-teaser' . $abbrClassAdd .
'">' . $text .
'</abbr>';
2631 $wrappedText =
'<span class="t3-help-link" href="#" data-table="' . $table .
'" data-field="' . $field .
'"';
2634 if ($hasHelpTextOverload) {
2635 if (isset($overloadHelpText[
'title'])) {
2636 $wrappedText .=
' data-title="' . htmlspecialchars($overloadHelpText[
'title']) .
'"';
2638 if (isset($overloadHelpText[
'description'])) {
2639 $wrappedText .=
' data-description="' . htmlspecialchars($overloadHelpText[
'description']) .
'"';
2642 $wrappedText .=
'>' . $text .
'</span>';
2644 return $wrappedText;
2660 static public function cshItem($table, $field,
$BACK_PATH, $wrap =
'', $onlyIconMode = FALSE, $styleAttrib =
'') {
2661 if (!
$GLOBALS[
'BE_USER']->uc[
'edit_showFieldHelp']) {
2664 $GLOBALS[
'LANG']->loadSingleTableDescription($table);
2665 if (is_array(
$GLOBALS[
'TCA_DESCR'][$table])) {
2667 $output = self::helpTextIcon($table, $field,
$BACK_PATH);
2668 if ($output && $wrap) {
2669 $wrParts = explode(
'|', $wrap);
2670 $output = $wrParts[0] . $output . $wrParts[1];
2686 static public function editOnClick($params, $backPath =
'', $requestUri =
'') {
2687 $retUrl =
'returnUrl=' . ($requestUri == -1 ?
'\'+T3_THIS_LOCATION+\
'' : rawurlencode(($requestUri ? $requestUri :
GeneralUtility::getIndpEnv(
'REQUEST_URI'))));
2688 return 'window.location.href=\'' . $backPath .
'alt_doc.php?' . $retUrl . $params .
'\';
return false;
'; 2705 static public function viewOnClick($pageUid, $backPath = '', $rootLine = '', $anchorSection = '', $alternativeUrl = '', $additionalGetVars = '', $switchFocus = TRUE) { 2706 $viewScript = '/index.php?
id=
'; 2707 if ($alternativeUrl) { 2708 $viewScript = $alternativeUrl; 2712 isset($GLOBALS['TYPO3_CONF_VARS
']['SC_OPTIONS
']['t3lib/
class.t3lib_befunc.php
']['viewOnClickClass
']) 2713 && is_array($GLOBALS['TYPO3_CONF_VARS
']['SC_OPTIONS
']['t3lib/
class.t3lib_befunc.php
']['viewOnClickClass
']) 2715 foreach ($GLOBALS['TYPO3_CONF_VARS
']['SC_OPTIONS
']['t3lib/
class.t3lib_befunc.php
']['viewOnClickClass
'] as $funcRef) { 2716 $hookObj = GeneralUtility::getUserObj($funcRef); 2717 if (method_exists($hookObj, 'preProcess
')) { 2718 $hookObj->preProcess($pageUid, $backPath, $rootLine, $anchorSection, $viewScript, $additionalGetVars, $switchFocus); 2723 if ($alternativeUrl) { 2724 $previewUrl = $viewScript; 2726 $previewUrl = self::createPreviewUrl($pageUid, $rootLine, $anchorSection, $additionalGetVars, $viewScript); 2729 $onclickCode = 'var previewWin = window.open(\
'' . $previewUrl .
'\',\
'newTYPO3frontendWindow\');' . ($switchFocus ?
'previewWin.focus();' :
'');
2730 return $onclickCode;
2744 static protected function createPreviewUrl($pageUid, $rootLine, $anchorSection, $additionalGetVars, $viewScript) {
2746 $viewLanguageOrder =
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.view.languageOrder');
2748 if (strlen($viewLanguageOrder) > 0) {
2751 if (!
$GLOBALS[
'BE_USER']->user[
'admin'] && strlen(
$GLOBALS[
'BE_USER']->groupData[
'allowed_languages'])) {
2752 $allowedLanguages = array_flip(explode(
',',
$GLOBALS[
'BE_USER']->groupData[
'allowed_languages']));
2756 foreach ($languageOrder as $langUid) {
2757 if (is_array($allowedLanguages) && count($allowedLanguages)) {
2759 if (isset($allowedLanguages[$langUid])) {
2760 $suffix =
'&L=' . $langUid;
2765 $suffix =
'&L=' . $langUid;
2770 $additionalGetVars .= $suffix;
2775 $sys_page->init(FALSE);
2776 $mountPointInfo = $sys_page->getMountPointInfo($pageUid);
2778 if ($mountPointInfo && $mountPointInfo[
'overlay']) {
2779 $pageUid = $mountPointInfo[
'mount_pid'];
2780 $additionalGetVars .=
'&MP=' . $mountPointInfo[
'MPvar'];
2782 $viewDomain = self::getViewDomain($pageUid, $rootLine);
2784 return $viewDomain . $viewScript . $pageUid . $additionalGetVars . $anchorSection;
2796 static public function getViewDomain($pageId, $rootLine = NULL) {
2798 if (!is_array($rootLine)) {
2799 $rootLine = self::BEgetRootLine($pageId);
2802 if (count($rootLine) > 0) {
2803 $urlParts = parse_url($domain);
2806 $page = (array) $sysPage->getPage($pageId);
2808 if ($page[
'url_scheme'] == \
TYPO3\CMS\Core\Utility\HttpUtility::SCHEME_HTTPS || $page[
'url_scheme'] == 0 &&
GeneralUtility::getIndpEnv(
'TYPO3_SSL')) {
2809 $protocol =
'https';
2811 $previewDomainConfig =
$GLOBALS[
'BE_USER']->getTSConfig(
'TCEMAIN.previewDomain', self::getPagesTSconfig($pageId));
2812 if ($previewDomainConfig[
'value']) {
2813 if (strpos($previewDomainConfig[
'value'],
'://') !== FALSE) {
2814 list($protocol, $domainName) = explode(
'://', $previewDomainConfig[
'value']);
2816 $domainName = $previewDomainConfig[
'value'];
2819 $domainName = self::firstDomainRecord($rootLine);
2822 $domain = $domainName;
2824 $domainRecord = self::getDomainStartPage($urlParts[
'host'], $urlParts[
'path']);
2825 $domain = $domainRecord[
'domainName'];
2828 $domain = $protocol .
'://' . $domain;
2833 $portNumber = (int)
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'lockSSLPort'];
2834 if ($portNumber > 0 && $portNumber !== 443 && $portNumber < 65536 && $protocol ===
'https') {
2835 $domain .=
':' . strval($portNumber);
2850 $pageTS_modOptions =
$GLOBALS[
'BE_USER']->getTSConfig($TSref, static::getPagesTSconfig($id));
2851 $BE_USER_modOptions =
$GLOBALS[
'BE_USER']->getTSConfig($TSref);
2852 if (is_null($BE_USER_modOptions[
'value'])) {
2853 unset($BE_USER_modOptions[
'value']);
2856 return $pageTS_modOptions;
2872 static public function getFuncMenu($mainParams, $elementName, $currentValue, $menuItems, $script =
'', $addparams =
'') {
2873 if (!is_array($menuItems) || count($menuItems) <= 1) {
2876 $scriptUrl = self::buildScriptUrl($mainParams, $addparams, $script);
2878 foreach ($menuItems as $value => $label) {
2879 $options[] =
'<option value="' . htmlspecialchars($value) .
'"' . ((string)$currentValue === (
string)$value ?
' selected="selected"' :
'') .
'>' . htmlspecialchars($label, ENT_COMPAT,
'UTF-8', FALSE) .
'</option>';
2881 if (count($options)) {
2882 $onChange =
'jumpToUrl(' .
GeneralUtility::quoteJSvalue($scriptUrl .
'&' . $elementName .
'=') .
'+this.options[this.selectedIndex].value,this);';
2885 <!-- Function Menu of module --> 2886 <select name="' . $elementName .
'" onchange="' . htmlspecialchars($onChange) .
'"> 2907 static public function getFuncCheck($mainParams, $elementName, $currentValue, $script =
'', $addParams =
'', $tagParams =
'') {
2908 $scriptUrl = self::buildScriptUrl($mainParams, $addParams, $script);
2913 ' type="checkbox"' .
2914 ' class="checkbox"' .
2915 ' name="' . $elementName .
'"' .
2916 ($currentValue ?
' checked="checked"' :
'') .
2917 ' onclick="' . htmlspecialchars($onClick) .
'"' .
2918 ($tagParams ?
' ' . $tagParams :
'') .
2936 static public function getFuncInput($mainParams, $elementName, $currentValue, $size = 10, $script =
'', $addParams =
'') {
2937 $scriptUrl = self::buildScriptUrl($mainParams, $addParams, $script);
2939 return '<input type="text"' .
$GLOBALS[
'TBE_TEMPLATE']->formWidth($size) .
' name="' . $elementName .
'" value="' . htmlspecialchars($currentValue) .
'" onchange="' . htmlspecialchars($onChange) .
'" />';
2951 if (!is_array($mainParams)) {
2952 $mainParams = array(
'id' => $mainParams);
2955 $script = basename(PATH_thisScript);
2977 $conf =
$GLOBALS[
'BE_USER']->getTSConfig($TSref, $modTSconfig);
2978 if (is_array($conf[
'properties'])) {
2979 foreach ($conf[
'properties'] as $key => $val) {
2981 unset($itemArray[$key]);
2998 $modData =
$GLOBALS[
'BE_USER']->getModuleData(
'TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getUpdateSignal',
'ses');
3000 $modData[$set] = array(
3002 'parameter' => $params
3008 $GLOBALS[
'BE_USER']->pushModuleData(
'TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getUpdateSignal', $modData);
3021 $modData =
$GLOBALS[
'BE_USER']->getModuleData(
'TYPO3\\CMS\\Backend\\Utility\\BackendUtility::getUpdateSignal',
'ses');
3022 if (!count($modData)) {
3026 if (isset(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_befunc.php'][
'updateSignalHook'])) {
3027 $updateSignals =
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
't3lib/class.t3lib_befunc.php'][
'updateSignalHook'];
3029 $updateSignals = array();
3032 foreach ($modData as $set => $val) {
3033 if (isset($updateSignals[$set])) {
3034 $params = array(
'set' => $set,
'parameter' => $val[
'parameter'],
'JScode' =>
'');
3037 $signals[] = $params[
'JScode'];
3040 case 'updatePageTree':
3042 if (top && top.TYPO3.Backend.NavigationContainer.PageTree) { 3043 top.TYPO3.Backend.NavigationContainer.PageTree.refreshTree(); 3047 case 'updateFolderTree':
3049 if (top && top.TYPO3.Backend.NavigationIframe) { 3050 top.TYPO3.Backend.NavigationIframe.refresh(); 3053 case 'updateModuleMenu':
3055 if (top && top.TYPO3.ModuleMenu.App) { 3056 top.TYPO3.ModuleMenu.App.refreshMenu(); 3061 $content = implode(LF, $signals);
3063 self::setUpdateSignal();
3081 static public function getModuleData($MOD_MENU, $CHANGED_SETTINGS, $modName, $type =
'', $dontValidateList =
'', $setDefaultList =
'') {
3082 if ($modName && is_string($modName)) {
3084 $settings =
$GLOBALS[
'BE_USER']->getModuleData($modName, $type);
3086 if (!is_array($settings)) {
3088 $settings = array();
3090 if (is_array($MOD_MENU)) {
3091 foreach ($MOD_MENU as $key => $var) {
3093 if (is_array($CHANGED_SETTINGS) && isset($CHANGED_SETTINGS[$key])) {
3094 if (is_array($CHANGED_SETTINGS[$key])) {
3095 $serializedSettings = serialize($CHANGED_SETTINGS[$key]);
3096 if ((
string)$settings[$key] !== $serializedSettings) {
3097 $settings[$key] = $serializedSettings;
3101 if ((
string)$settings[$key] !== (
string)$CHANGED_SETTINGS[$key]) {
3102 $settings[$key] = $CHANGED_SETTINGS[$key];
3110 if (is_array($settings[$key]) || !isset($MOD_MENU[$key][$settings[$key]])) {
3111 $settings[$key] = (string) key($var);
3116 if ($setDefaultList && !is_array($var)) {
3118 $settings[$key] = (string) $var;
3126 $GLOBALS[
'BE_USER']->pushModuleData($modName, $settings);
3130 die(
'Wrong module name: "' . $modName .
'"');
3143 static public function getModuleUrl(
$moduleName, $urlParameters = array(), $backPathOverride = FALSE, $returnAbsoluteUrl = FALSE) {
3144 if ($backPathOverride === FALSE) {
3147 $backPath = $backPathOverride;
3149 $urlParameters = array(
3151 'moduleToken' => \
TYPO3\CMS\Core\FormProtection\FormProtectionFactory::get()->generateToken(
'moduleCall',
$moduleName)
3154 if ($returnAbsoluteUrl) {
3157 return $backPath . $url;
3174 static public function getAjaxUrl($ajaxIdentifier, array $urlParameters = array(), $backPathOverride = FALSE, $returnAbsoluteUrl = FALSE) {
3175 if ($backPathOverride) {
3176 $backPath = $backPathOverride;
3180 $additionalUrlParameters = array(
3181 'ajaxID' => $ajaxIdentifier
3183 if (!empty(
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'AJAX'][$ajaxIdentifier][
'csrfTokenCheck'])) {
3187 if ($returnAbsoluteUrl) {
3190 return $backPath . $url;
3202 static public function getListViewLink($urlParameters = array(), $linkTitle =
'', $linkText =
'') {
3203 $url = self::getModuleUrl(
'web_list', $urlParameters);
3204 if ($url === FALSE) {
3207 return '<a href="' . htmlspecialchars($url) .
'" title="' . htmlspecialchars($linkTitle) .
'">' .
IconUtility::getSpriteIcon(
'actions-system-list-open') . htmlspecialchars($linkText) .
'</a>';
3218 static public function getUrlToken($formName =
'securityToken', $tokenName =
'formToken') {
3220 return '&' . $tokenName .
'=' .
$formprotection->generateToken($formName);
3239 if (isset(
$GLOBALS[
'BE_USER']->user[
'uid'])) {
3240 $user_id = (int)
$GLOBALS[
'BE_USER']->user[
'uid'];
3241 if ($table &&
$uid) {
3242 $fields_values = array(
3243 'userid' => $user_id,
3246 'record_table' => $table,
3247 'record_uid' =>
$uid,
3248 'username' =>
$GLOBALS[
'BE_USER']->user[
'username'],
3249 'record_pid' => $pid
3251 $GLOBALS[
'TYPO3_DB']->exec_INSERTquery(
'sys_lockedrecords', $fields_values);
3253 $GLOBALS[
'TYPO3_DB']->exec_DELETEquery(
'sys_lockedrecords',
'userid=' . (
int)$user_id);
3269 if (!is_array(
$GLOBALS[
'LOCKED_RECORDS'])) {
3270 $GLOBALS[
'LOCKED_RECORDS'] = array();
3271 $res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
'*',
'sys_lockedrecords',
'sys_lockedrecords.userid<>' . (
int)
$GLOBALS[
'BE_USER']->user[
'uid'] .
' 3272 AND sys_lockedrecords.tstamp > ' . (
$GLOBALS[
'EXEC_TIME'] - 2 * 3600));
3273 while ($row =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res)) {
3275 if ($row[
'userid']) {
3276 $userTypeLabel =
'beUser';
3277 } elseif ($row[
'feuserid']) {
3278 $userTypeLabel =
'feUser';
3280 $userTypeLabel =
'user';
3282 $userType =
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.' . $userTypeLabel);
3284 if ($row[
'username']) {
3285 $userName = $row[
'username'];
3287 $userName =
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.unknownUser');
3289 $GLOBALS[
'LOCKED_RECORDS'][$row[
'record_table'] .
':' . $row[
'record_uid']] = $row;
3290 $GLOBALS[
'LOCKED_RECORDS'][$row[
'record_table'] .
':' . $row[
'record_uid']][
'msg'] = sprintf(
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.lockedRecordUser'), $userType, $userName, self::calcAge(
$GLOBALS[
'EXEC_TIME'] - $row[
'tstamp'],
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')));
3291 if ($row[
'record_pid'] && !isset(
$GLOBALS[
'LOCKED_RECORDS'][($row[
'record_table'] .
':' . $row[
'record_pid'])])) {
3292 $GLOBALS[
'LOCKED_RECORDS'][
'pages:' . $row[
'record_pid']][
'msg'] = sprintf(
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.lockedRecordUser_content'), $userType, $userName, self::calcAge(
$GLOBALS[
'EXEC_TIME'] - $row[
'tstamp'],
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_core.xlf:labels.minutesHoursDaysYears')));
3295 $GLOBALS[
'TYPO3_DB']->sql_free_result($res);
3297 return $GLOBALS[
'LOCKED_RECORDS'][$table .
':' .
$uid];
3311 $foreign_table = $fieldValue[
'config'][$prefix .
'foreign_table'];
3312 $rootLevel =
$GLOBALS[
'TCA'][$foreign_table][
'ctrl'][
'rootLevel'];
3313 $fTWHERE = $fieldValue[
'config'][$prefix .
'foreign_table_where'];
3314 $fTWHERE = static::replaceMarkersInWhereClause($fTWHERE, $foreign_table, $field, $TSconfig);
3315 $wgolParts =
$GLOBALS[
'TYPO3_DB']->splitGroupOrderLimit($fTWHERE);
3319 if ($rootLevel == 1 || $rootLevel == -1) {
3320 $pidWhere = $foreign_table .
'.pid' . (($rootLevel == -1) ?
'<>-1' :
'=0');
3321 $queryParts = array(
3322 'SELECT' => self::getCommonSelectFields($foreign_table, $foreign_table .
'.'),
3323 'FROM' => $foreign_table,
3324 'WHERE' => $pidWhere .
' ' . self::deleteClause($foreign_table) .
' ' . $wgolParts[
'WHERE'],
3325 'GROUPBY' => $wgolParts[
'GROUPBY'],
3326 'ORDERBY' => $wgolParts[
'ORDERBY'],
3327 'LIMIT' => $wgolParts[
'LIMIT']
3330 $pageClause =
$GLOBALS[
'BE_USER']->getPagePermsClause(1);
3331 if ($foreign_table !=
'pages') {
3332 $queryParts = array(
3333 'SELECT' => self::getCommonSelectFields($foreign_table, $foreign_table .
'.'),
3334 'FROM' => $foreign_table .
', pages',
3335 'WHERE' =>
'pages.uid=' . $foreign_table .
'.pid 3336 AND pages.deleted=0 ' . self::deleteClause($foreign_table) .
' AND ' . $pageClause .
' ' . $wgolParts[
'WHERE'],
3337 'GROUPBY' => $wgolParts[
'GROUPBY'],
3338 'ORDERBY' => $wgolParts[
'ORDERBY'],
3339 'LIMIT' => $wgolParts[
'LIMIT']
3342 $queryParts = array(
3343 'SELECT' => self::getCommonSelectFields($foreign_table, $foreign_table .
'.'),
3345 'WHERE' =>
'pages.deleted=0 3346 AND ' . $pageClause .
' ' . $wgolParts[
'WHERE'],
3347 'GROUPBY' => $wgolParts[
'GROUPBY'],
3348 'ORDERBY' => $wgolParts[
'ORDERBY'],
3349 'LIMIT' => $wgolParts[
'LIMIT']
3353 return $GLOBALS[
'TYPO3_DB']->exec_SELECT_queryArray($queryParts);
3376 if (strstr($whereClause,
'###REC_FIELD_')) {
3377 $whereClauseParts = explode(
'###REC_FIELD_', $whereClause);
3378 foreach ($whereClauseParts as $key => $value) {
3380 $whereClauseSubarts = explode(
'###', $value, 2);
3381 if (substr($whereClauseParts[0], -1) ===
'\'' && $whereClauseSubarts[1][0] ===
'\'') {
3382 $whereClauseParts[$key] =
$GLOBALS[
'TYPO3_DB']->quoteStr($tsConfig[
'_THIS_ROW'][$whereClauseSubarts[0]], $table) . $whereClauseSubarts[1];
3384 $whereClauseParts[$key] =
$GLOBALS[
'TYPO3_DB']->fullQuoteStr($tsConfig[
'_THIS_ROW'][$whereClauseSubarts[0]], $table) . $whereClauseSubarts[1];
3388 $whereClause = implode(
'', $whereClauseParts);
3390 return str_replace (
3392 '###CURRENT_PID###',
3395 '###STORAGE_PID###',
3397 '###PAGE_TSCONFIG_ID###',
3398 '###PAGE_TSCONFIG_IDLIST###',
3399 '###PAGE_TSCONFIG_STR###' 3402 (
int)$tsConfig[
'_CURRENT_PID'],
3403 (
int)$tsConfig[
'_THIS_UID'],
3404 (
int)$tsConfig[
'_THIS_CID'],
3405 (
int)$tsConfig[
'_STORAGE_PID'],
3406 (
int)$tsConfig[
'_SITEROOT'],
3407 (
int)$tsConfig[$field][
'PAGE_TSCONFIG_ID'],
3408 $GLOBALS[
'TYPO3_DB']->cleanIntList($tsConfig[$field][
'PAGE_TSCONFIG_IDLIST']),
3409 $GLOBALS[
'TYPO3_DB']->quoteStr($tsConfig[$field][
'PAGE_TSCONFIG_STR'], $table)
3424 self::fixVersioningPid($table, $row);
3426 $typeVal = self::getTCAtypeValue($table, $row);
3428 list($TScID, $cPid) = self::getTSCpid($table, $row[
'uid'], $row[
'pid']);
3430 $tempConf =
$GLOBALS[
'BE_USER']->getTSConfig(
'TCEFORM.' . $table, self::getPagesTSconfig($TScID));
3431 if (is_array($tempConf[
'properties'])) {
3432 foreach ($tempConf[
'properties'] as $key => $val) {
3433 if (is_array($val)) {
3434 $fieldN = substr($key, 0, -1);
3435 $res[$fieldN] = $val;
3436 unset($res[$fieldN][
'types.']);
3437 if ((
string)$typeVal !==
'' && is_array($val[
'types.'][$typeVal .
'.'])) {
3444 $res[
'_CURRENT_PID'] = $cPid;
3445 $res[
'_THIS_UID'] = $row[
'uid'];
3446 $res[
'_THIS_CID'] = $row[
'cid'];
3448 $res[
'_THIS_ROW'] = $row;
3449 $rootLine = self::BEgetRootLine($TScID,
'', TRUE);
3450 foreach ($rootLine as $rC) {
3451 if (!$res[
'_STORAGE_PID']) {
3452 $res[
'_STORAGE_PID'] = (int)$rC[
'storage_pid'];
3454 if (!$res[
'_SITEROOT']) {
3455 $res[
'_SITEROOT'] = $rC[
'is_siteroot'] ? (int)$rC[
'uid'] : 0;
3477 $thePidValue = (int)$pid;
3479 if ($thePidValue < 0) {
3480 $pidRec = self::getRecord($table, abs($thePidValue),
'pid');
3481 $thePidValue = is_array($pidRec) ? $pidRec[
'pid'] : -2;
3485 $rr = self::getRecord($table,
$uid);
3486 if (is_array($rr)) {
3488 if ($rr[
'pid'] ==
'-1') {
3489 $rr = self::getRecord($table, $rr[
't3ver_oid'],
'pid');
3490 if (is_array($rr)) {
3491 $thePidValue = $rr[
'pid'];
3495 $thePidValue = $rr[
'pid'];
3498 if (!$thePidValue) {
3503 return $thePidValue;
3533 $cPid = self::getTSconfig_pidValue($table,
$uid, $pid);
3535 $TScID = self::getPidForModTSconfig($table,
$uid, $cPid);
3536 return array($TScID, $cPid);
3546 foreach ($rootLine as $row) {
3547 $dRec = self::getRecordsByField(
'sys_domain',
'pid', $row[
'uid'],
' AND redirectTo=\'\' AND hidden=0',
'',
'sorting');
3548 if (is_array($dRec)) {
3549 $dRecord = reset($dRec);
3550 return rtrim($dRecord[
'domainName'],
'/');
3564 $domain = explode(
':', $domain);
3565 $domain = strtolower(preg_replace(
'/\\.$/',
'', $domain[0]));
3567 $path = trim(preg_replace(
'/\\/[^\\/]*$/',
'', $path));
3570 $res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
'sys_domain.*',
'pages,sys_domain',
' 3571 pages.uid=sys_domain.pid 3572 AND sys_domain.hidden=0 3573 AND (sys_domain.domainName=' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr($domain,
'sys_domain') .
' OR sys_domain.domainName=' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr(($domain .
'/'),
'sys_domain') .
')' . self::deleteClause(
'pages'),
'',
'',
'1');
3575 $GLOBALS[
'TYPO3_DB']->sql_free_result($res);
3589 static public function RTEsetup($RTEprop, $table, $field, $type =
'') {
3590 $thisConfig = is_array($RTEprop[
'default.']) ? $RTEprop[
'default.'] : array();
3591 $thisFieldConf = $RTEprop[
'config.'][$table .
'.'][$field .
'.'];
3592 if (is_array($thisFieldConf)) {
3593 unset($thisFieldConf[
'types.']);
3596 if ($type && is_array($RTEprop[
'config.'][$table .
'.'][$field .
'.'][
'types.'][$type .
'.'])) {
3610 if (!isset(
$GLOBALS[
'T3_VAR'][
'RTEobj'])) {
3612 $GLOBALS[
'T3_VAR'][
'RTEobj'] = array();
3614 if (is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'RTE_reg'])) {
3615 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'RTE_reg'] as $extKey => $rteObjCfg) {
3617 if (is_object($rteObj)) {
3618 if ($rteObj->isAvailable()) {
3619 $GLOBALS[
'T3_VAR'][
'RTEobj'] = $rteObj;
3622 $GLOBALS[
'T3_VAR'][
'RTEobj'] = array_merge(
$GLOBALS[
'T3_VAR'][
'RTEobj'], $rteObj->errorLog);
3627 if (!count(
$GLOBALS[
'T3_VAR'][
'RTEobj'])) {
3628 $GLOBALS[
'T3_VAR'][
'RTEobj'][] =
'No RTEs configured at all';
3632 return $GLOBALS[
'T3_VAR'][
'RTEobj'];
3644 if (!isset(
$GLOBALS[
'T3_VAR'][
'softRefParser'][$spKey])) {
3646 $GLOBALS[
'T3_VAR'][
'softRefParser'][$spKey] =
'';
3648 $objRef =
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'GLOBAL'][
'softRefParser'][$spKey]
3649 ?
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'GLOBAL'][
'softRefParser'][$spKey]
3650 :
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'GLOBAL'][
'softRefParser_GL'][$spKey];
3653 if (is_object($softRefParserObj)) {
3654 $GLOBALS[
'T3_VAR'][
'softRefParser'][$spKey] = $softRefParserObj;
3659 return $GLOBALS[
'T3_VAR'][
'softRefParser'][$spKey];
3678 $runtimeCache = self::getRuntimeCache();
3679 $cacheId =
'backend-softRefList-' . md5($parserList);
3680 if ($runtimeCache->has($cacheId)) {
3681 return $runtimeCache->get($cacheId);
3685 if (is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'GLOBAL'][
'softRefParser_GL']) && !empty(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'GLOBAL'][
'softRefParser_GL'])) {
3686 $parserList = implode(
',', array_keys(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'GLOBAL'][
'softRefParser_GL'])) .
',' . $parserList;
3690 if ($parserList ===
'') {
3691 $runtimeCache->set($cacheId, FALSE);
3698 foreach ($keyList as $val) {
3700 if (preg_match(
'/^([[:alnum:]_-]+)\\[(.*)\\]$/', $val, $reg)) {
3706 $runtimeCache->set($cacheId, $output);
3718 foreach (
$GLOBALS[
'TBE_MODULES'] as $mkey => $list) {
3720 if (!is_array($list) && trim($list)) {
3722 foreach ($subList as $skey) {
3723 $loaded[$mkey .
'_' . $skey] = 1;
3727 return $modName && isset($loaded[$modName]);
3740 if ($count === NULL) {
3742 if ($table ==
'_FILE') {
3745 $condition =
'ref_string=' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr($ref,
'sys_refindex');
3750 $condition =
'ref_uid=' . (int)$ref;
3751 if ($table ===
'sys_file') {
3752 $condition .=
' AND tablename != ' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr(
'sys_file_metadata', $table);
3755 $count =
$GLOBALS[
'TYPO3_DB']->exec_SELECTcountRows(
'*',
'sys_refindex',
'ref_table=' .
$GLOBALS[
'TYPO3_DB']->fullQuoteStr($table,
'sys_refindex') .
' AND ' . $condition .
' AND deleted=0');
3757 return $count ? ($msg ? sprintf($msg, $count) : $count) :
'';
3769 if (empty(
$GLOBALS[
'TCA'][$table][
'ctrl'][
'transForeignTable']) &&
$GLOBALS[
'TCA'][$table][
'ctrl'][
'languageField'] &&
$GLOBALS[
'TCA'][$table][
'ctrl'][
'transOrigPointerField'] && !
$GLOBALS[
'TCA'][$table][
'ctrl'][
'transOrigPointerTable']) {
3770 $where =
$GLOBALS[
'TCA'][$table][
'ctrl'][
'transOrigPointerField'] .
'=' . (int)$ref .
' AND ' .
$GLOBALS[
'TCA'][$table][
'ctrl'][
'languageField'] .
'<>0';
3771 if (!empty(
$GLOBALS[
'TCA'][$table][
'ctrl'][
'delete'])) {
3772 $where .=
' AND ' .
$GLOBALS[
'TCA'][$table][
'ctrl'][
'delete'] .
'=0';
3774 $count =
$GLOBALS[
'TYPO3_DB']->exec_SELECTcountRows(
'*', $table, $where);
3776 return $count ? ($msg ? sprintf($msg, $count) : $count) :
'';
3797 $outputRows = array();
3798 if (
$GLOBALS[
'TCA'][$table] &&
$GLOBALS[
'TCA'][$table][
'ctrl'][
'versioningWS']) {
3799 if (is_array($row) && !$includeDeletedRecords) {
3800 $row[
'_CURRENT_VERSION'] = TRUE;
3801 $realPid = $row[
'pid'];
3802 $outputRows[] = $row;
3805 $row = BackendUtility::getRecord($table,
$uid, $fields,
'', !$includeDeletedRecords);
3808 $row[
'_CURRENT_VERSION'] = TRUE;
3809 $realPid = $row[
'pid'];
3810 $outputRows[] = $row;
3813 $workspaceSqlPart =
'';
3814 if ($workspace === 0) {
3816 $workspaceSqlPart =
' AND t3ver_wsid=0';
3817 } elseif ($workspace !== NULL) {
3819 $workspaceSqlPart =
' AND t3ver_wsid IN (0,' . (int)$workspace .
')';
3822 $rows =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetRows(
3825 'pid=-1 AND uid<>' . (
int)
$uid .
' AND t3ver_oid=' . (
int)
$uid 3827 . ($includeDeletedRecords ?
'' : self::deleteClause($table)),
3832 if (is_array($rows)) {
3833 $outputRows = array_merge($outputRows, $rows);
3836 foreach ($outputRows as $idx => $oRow) {
3837 $outputRows[$idx][
'_REAL_PID'] = $realPid;
3859 if (is_array($rr) && $rr[
'pid'] == -1 &&
$GLOBALS[
'TCA'][$table][
'ctrl'][
'versioningWS']) {
3861 if (isset($rr[
't3ver_oid']) && isset($rr[
't3ver_wsid'])) {
3863 $oid = $rr[
't3ver_oid'];
3864 $wsid = $rr[
't3ver_wsid'];
3867 $newPidRec = self::getRecord($table, $rr[
'uid'],
't3ver_oid,t3ver_wsid');
3868 if (is_array($newPidRec)) {
3869 $oid = $newPidRec[
't3ver_oid'];
3870 $wsid = $newPidRec[
't3ver_wsid'];
3874 if ($oid && ($ignoreWorkspaceMatch || (
int)$wsid === (
int)
$GLOBALS[
'BE_USER']->workspace)) {
3875 $oidRec = self::getRecord($table, $oid,
'pid');
3876 if (is_array($oidRec)) {
3877 $rr[
'_ORIG_pid'] = $rr[
'pid'];
3878 $rr[
'pid'] = $oidRec[
'pid'];
3883 !isset($rr[
't3ver_state'])
3886 $movePlaceholder = self::getMovePlaceholder($table, $oid,
'pid');
3887 if ($movePlaceholder) {
3888 $rr[
'_ORIG_pid'] = $rr[
'pid'];
3889 $rr[
'pid'] = $movePlaceholder[
'pid'];
3913 static public function workspaceOL($table, &$row, $wsid = -99, $unsetMovePointers = FALSE) {
3917 $previewMovePlaceholders = TRUE;
3920 $wsid =
$GLOBALS[
'BE_USER']->workspace;
3923 if ($wsid !== 0 && is_array($row)) {
3925 if ($previewMovePlaceholders) {
3926 $orig_uid = $row[
'uid'];
3927 $orig_pid = $row[
'pid'];
3928 $movePldSwap = self::movePlhOL($table, $row);
3930 $wsAlt = self::getWorkspaceVersionOfRecord($wsid, $table, $row[
'uid'], implode(
',', array_keys($row)));
3932 if (is_array($wsAlt)) {
3934 if ($previewMovePlaceholders && !$movePldSwap && ($table ==
'pages' || (
int)
$GLOBALS[
'TCA'][$table][
'ctrl'][
'versioningWS'] >= 2) && $unsetMovePointers) {
3937 if (!isset($wsAlt[
't3ver_state'])) {
3938 $stateRec = self::getRecord($table, $wsAlt[
'uid'],
't3ver_state');
3950 if (isset($wsAlt[
'pid'])) {
3952 $wsAlt[
'_ORIG_pid'] = $wsAlt[
'pid'];
3954 $wsAlt[
'pid'] = $row[
'pid'];
3957 $wsAlt[
'_ORIG_uid'] = $wsAlt[
'uid'];
3958 $wsAlt[
'uid'] = $row[
'uid'];
3960 $wsAlt[
'_CSSCLASS'] =
'ver-element';
3966 $row[
'_MOVE_PLH'] = TRUE;
3967 $row[
'_MOVE_PLH_uid'] = $orig_uid;
3968 $row[
'_MOVE_PLH_pid'] = $orig_pid;
3987 if ($table ==
'pages' || (
int)
$GLOBALS[
'TCA'][$table][
'ctrl'][
'versioningWS'] >= 2) {
3989 if (!isset($row[
't3ver_move_id']) || !isset($row[
't3ver_state'])) {
3990 $moveIDRec = self::getRecord($table, $row[
'uid'],
't3ver_move_id, t3ver_state');
3991 $moveID = $moveIDRec[
't3ver_move_id'];
3994 $moveID = $row[
't3ver_move_id'];
3999 if ($origRow = self::getRecord($table, $moveID, implode(
',', array_keys($row)))) {
4019 if ($workspace !== 0 &&
$GLOBALS[
'TCA'][$table] &&
$GLOBALS[
'TCA'][$table][
'ctrl'][
'versioningWS']) {
4021 $row =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetSingleRow($fields, $table,
'pid=-1 AND ' .
't3ver_oid=' . (
int)
$uid .
' AND ' .
't3ver_wsid=' . (
int)$workspace . self::deleteClause($table));
4022 if (is_array($row)) {
4039 $liveVersionId = self::getLiveVersionIdOfRecord($table,
$uid);
4040 if (is_null($liveVersionId) === FALSE) {
4041 return self::getRecord($table, $liveVersionId, $fields);
4053 $liveVersionId = NULL;
4054 if (self::isTableWorkspaceEnabled($table)) {
4055 $currentRecord = self::getRecord($table,
$uid,
'pid,t3ver_oid');
4056 if (is_array($currentRecord) && $currentRecord[
'pid'] == -1) {
4057 $liveVersionId = $currentRecord[
't3ver_oid'];
4060 return $liveVersionId;
4071 if (
$GLOBALS[
'TCA'][$table] &&
$GLOBALS[
'TCA'][$table][
'ctrl'][
'versioningWS']) {
4072 $currentWorkspace = (int)
$GLOBALS[
'BE_USER']->workspace;
4086 if (self::isTableWorkspaceEnabled($table)) {
4087 if (is_null($workspaceId)) {
4088 $workspaceId =
$GLOBALS[
'BE_USER']->workspace;
4090 $workspaceId = (int)$workspaceId;
4091 $pidOperator = $workspaceId === 0 ?
'!=' :
'=';
4092 $whereClause =
' AND ' . $table .
'.t3ver_wsid=' . $workspaceId .
' AND ' . $table .
'.pid' . $pidOperator .
'-1';
4094 return $whereClause;
4106 if ($workspace != 0) {
4107 foreach (
$GLOBALS[
'TCA'] as $tableName => $cfg) {
4108 if ($tableName !=
'pages' && $cfg[
'ctrl'][
'versioningWS']) {
4109 $joinStatement =
'A.t3ver_oid=B.uid';
4111 if (self::isTableMovePlaceholderAware($tableName)) {
4113 $joinStatement =
'(A.t3ver_oid=B.uid AND A.t3ver_state<>' . $movePointer
4114 .
' OR A.t3ver_oid=B.t3ver_move_id AND A.t3ver_state=' . $movePointer .
')';
4118 $output[$tableName] =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetRows(
4119 'B.uid as live_uid, A.uid as offline_uid',
4120 $tableName .
' A,' . $tableName .
' B',
4121 'A.pid=-1' .
' AND B.pid=' . (
int)$pageId
4122 .
' AND A.t3ver_wsid=' . (
int)$workspace .
' AND ' . $joinStatement
4123 . self::deleteClause($tableName,
'A') . self::deleteClause($tableName,
'B')
4125 if (!is_array($output[$tableName]) || !count($output[$tableName])) {
4126 unset($output[$tableName]);
4142 if ($wsRec = self::getWorkspaceVersionOfRecord(
$GLOBALS[
'BE_USER']->workspace, $table,
$uid,
'uid')) {
4143 return $wsRec[
'uid'];
4159 if ($workspace === NULL) {
4160 $workspace =
$GLOBALS[
'BE_USER']->workspace;
4162 if ((
int)$workspace !== 0 &&
$GLOBALS[
'TCA'][$table] && (
int)
$GLOBALS[
'TCA'][$table][
'ctrl'][
'versioningWS'] >= 2) {
4164 $row =
$GLOBALS[
'TYPO3_DB']->exec_SELECTgetSingleRow(
4168 . (
int)
$uid .
' AND t3ver_wsid=' . (
int)$workspace . self::deleteClause($table)
4170 if (is_array($row)) {
4195 $loginCopyrightWarrantyProvider = strip_tags(trim(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'loginCopyrightWarrantyProvider']));
4196 $loginCopyrightWarrantyURL = strip_tags(trim(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'loginCopyrightWarrantyURL']));
4198 $versionNumber = $showVersionNumber ?
4199 ' ' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_login.xlf:version.short') .
' ' .
4200 htmlspecialchars(TYPO3_version) :
'';
4202 if (strlen($loginCopyrightWarrantyProvider) >= 2 && strlen($loginCopyrightWarrantyURL) >= 10) {
4203 $warrantyNote = sprintf(
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_login.xlf:warranty.by'), htmlspecialchars($loginCopyrightWarrantyProvider),
'<a href="' . htmlspecialchars($loginCopyrightWarrantyURL) .
'" target="_blank">',
'</a>');
4205 $warrantyNote = sprintf(
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_login.xlf:no.warranty'),
'<a href="' . TYPO3_URL_LICENSE .
'" target="_blank">',
'</a>');
4207 $cNotice =
'<a href="' . TYPO3_URL_GENERAL .
'" target="_blank">' .
4208 '<img' .
IconUtility::skinImg(
$GLOBALS[
'BACK_PATH'],
'gfx/loginlogo_transp.gif',
'width="75" height="24" vspace="2" hspace="4"') .
' alt="' .
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_login.xlf:typo3.logo') .
'" align="left" />' .
4209 $GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_login.xlf:typo3.cms') . $versionNumber .
'</a>. ' .
4210 $GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_login.xlf:copyright') .
' © ' . htmlspecialchars(TYPO3_copyright_year) .
' Kasper Skårhøj. ' .
4211 $GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_login.xlf:extension.copyright') .
' ' .
4212 sprintf(
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_login.xlf:details.link'), (
'<a href="' . TYPO3_URL_GENERAL .
'" target="_blank">' . TYPO3_URL_GENERAL .
'</a>')) .
' ' .
4213 strip_tags($warrantyNote,
'<a>') .
' ' .
4214 sprintf(
$GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_login.xlf:free.software'), (
'<a href="' . TYPO3_URL_LICENSE .
'" target="_blank">'),
'</a> ') .
4215 $GLOBALS[
'LANG']->sL(
'LLL:EXT:lang/locallang_login.xlf:keep.notice');
4249 static public function ADMCMD_previewCmds($pageinfo) {
4252 if ($pageinfo[
'fe_group'] > 0) {
4253 $simUser =
'&ADMCMD_simUser=' . $pageinfo[
'fe_group'];
4254 } elseif ((
int)$pageinfo[
'fe_group'] === -2) {
4259 if (!empty($activeFeGroupRow)) {
4260 $simUser =
'&ADMCMD_simUser=' . $activeFeGroupRow[
'uid'];
4263 if ($pageinfo[
'starttime'] >
$GLOBALS[
'EXEC_TIME']) {
4264 $simTime =
'&ADMCMD_simTime=' . $pageinfo[
'starttime'];
4266 if ($pageinfo[
'endtime'] <
$GLOBALS[
'EXEC_TIME'] && $pageinfo[
'endtime'] != 0) {
4267 $simTime =
'&ADMCMD_simTime=' . ($pageinfo[
'endtime'] - 1);
4269 return $simUser . $simTime;
4281 $paramArr = array();
4282 $lines = explode(LF, $params);
4283 foreach ($lines as $val) {
4286 $pair = explode(
'=', $val, 2);
4287 $paramArr[trim($pair[0])] = trim($pair[1]);
4301 $interface =
$GLOBALS[
'BE_USER']->uc[
'interfaceSetup'];
4303 switch ($interface) {
4310 $script =
'backend.php';
4322 return !empty(
$GLOBALS[
'TCA'][$table][
'ctrl'][
'versioningWS']);
4333 return (self::isTableWorkspaceEnabled($table) && (
int)
$GLOBALS[
'TCA'][$table][
'ctrl'][
'versioningWS'] === 2);
4344 $configuration = array();
4345 if (isset(
$GLOBALS[
'TCA'][$table][
'columns'][$field][
'config'])) {
4346 $configuration =
$GLOBALS[
'TCA'][$table][
'columns'][$field][
'config'];
4348 return $configuration;
4360 return !empty(
$GLOBALS[
'TCA'][$table][
'ctrl'][
'security'][
'ignoreWebMountRestriction']);
4372 return !empty(
$GLOBALS[
'TCA'][$table][
'ctrl'][
'security'][
'ignoreRootLevelRestriction']);
4394 $signalArguments = static::getSignalSlotDispatcher()->dispatch(__CLASS__,
'getPagesTSconfigPreInclude', array($TSdataArray, $id, $rootLine, $returnPartArray));
4395 return $signalArguments[0];
static referenceCount($table, $ref, $msg='', $count=NULL)
static translationCount($table, $ref, $msg='')
static getTSconfig_pidValue($table, $uid, $pid)
static mergeRecursiveWithOverrule(array &$original, array $overrule, $addKeys=TRUE, $includeEmptyValues=TRUE, $enableUnsetFeature=TRUE)
static uniqueList($in_list, $secondParameter=NULL)
static titleAltAttrib($content)
static blindUserNames($usernames, $groupArray, $excludeBlindedFlag=0)
static skinImg($backPath, $src, $wHattribs='', $outputMode=0)
static getFuncCheck($mainParams, $elementName, $currentValue, $script='', $addParams='', $tagParams='')
static getRecordWSOL($table, $uid, $fields=' *', $where='', $useDeleteClause=TRUE, $unsetMovePointers=FALSE)
static readPageAccess($id, $perms_clause)
static getWorkspaceVersionOfRecord($workspace, $table, $uid, $fields=' *')
static createPreviewUrl($pageUid, $rootLine, $anchorSection, $additionalGetVars, $viewScript)
static getTCEFORM_TSconfig($table, $row)
static helpTextIcon($table, $field, $BACK_PATH, $force=0)
static getAjaxUrl($ajaxIdentifier, array $urlParameters=array(), $backPathOverride=FALSE, $returnAbsoluteUrl=FALSE)
static getModTSconfig($id, $TSref)
static helpText($table, $field)
static editOnClick($params, $backPath='', $requestUri='')
static getItemLabel($table, $col, $printAllWrap='')
static getRecordsByField($theTable, $theField, $theValue, $whereClause='', $groupBy='', $orderBy='', $limit='', $useDeleteClause=TRUE)
static daysUntil($tstamp)
static isTableWorkspaceEnabled($table)
static BEgetRootLine($uid, $clause='', $workspaceOL=FALSE)
static getTCAtypeValue($table, $row)
static countVersionsOfRecordsOnPage($workspace, $pageId)
static isFirstPartOfStr($str, $partStr)
static firstDomainRecord($rootLine)
static getNoRecordTitle($prep=FALSE)
static getSpriteIconForResource(\TYPO3\CMS\Core\Resource\ResourceInterface $resource, array $options=array(), array $overlays=array())
static explodeSoftRefParserList($parserList)
static resolveAllSheetsInDS(array $dataStructArray)
static quoteJSvalue($value)
static openPageTree($pid, $clearExpansion)
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 getUserObj($classRef, $checkPrefix='', $silent=FALSE)
static getRecordsSortedByTitle(array $fields, $table, $titleField, $where='')
static getWorkspaceWhereClause($table, $workspaceId=NULL)
static getMovePlaceholder($table, $uid, $fields=' *', $workspace=NULL)
static getUpdateSignalCode()
static getFuncInput($mainParams, $elementName, $currentValue, $size=10, $script='', $addParams='')
static logDeprecatedFunction()
static getGroupNames($fields='title, uid', $where='')
static movePlhOL($table, &$row)
static lockRecords($table='', $uid=0, $pid=0)
static getUrlToken($formName='securityToken', $tokenName='formToken')
static makeInstance($className)
static replaceMarkersInWhereClause($whereClause, $table, $field='', $tsConfig=array())
static storeHash($hash, $data, $ident)
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
static getFlexFormDS($conf, $row, $table, $fieldName='', $WSOL=TRUE, $newRecordPidValue=0)
static getBackendScript($interface='')
static callUserFunction($funcName, &$params, &$ref, $checkPrefix='', $errorMode=0)
static getTSCpid($table, $uid, $pid)
static calcAge($seconds, $labels=' min|hrs|days|yrs|min|hour|day|year')
static wsMapId($table, $uid)
static getProcessedValueExtra($table, $fN, $fV, $fixed_lgd_chars=0, $uid=0, $forceResult=TRUE)
static implodeTSParams($p, $k='')
static getRecordTitle($table, $row, $prep=FALSE, $forceResult=TRUE)
static getLiveVersionIdOfRecord($table, $uid)
static isWebMountRestrictionIgnored($table)
static getPathType_web_nonweb($path)
static getModuleUrl($moduleName, $urlParameters=array(), $backPathOverride=FALSE, $returnAbsoluteUrl=FALSE)
static getInlineLocalizationMode($table, $fieldOrConfig)
static getExcludeFields()
static time($value, $withSeconds=TRUE)
static wrapInHelp($table, $field, $text='', array $overloadHelpText=array())
static processParams($params)
static isRootLevelRestrictionIgnored($table)
static checkIncludeLines_array(array $array)
static isTableMovePlaceholderAware($table)
static displayWarningMessages()
static getDomainStartPage($domain, $path='')
if($list_of_literals) if(!empty($literals)) if(!empty($literals)) $result
Analyse literals to prepend the N char to them if their contents aren't numeric.
static getRegisteredFlexForms($table='tt_content')
static getCommonSelectFields($table, $prefix='', $fields=array())
static getModuleData($MOD_MENU, $CHANGED_SETTINGS, $modName, $type='', $dontValidateList='', $setDefaultList='')
static getUrl($url, $includeHeader=0, $requestHeaders=FALSE, &$report=NULL)
static emitGetPagesTSconfigPreIncludeSignal(array $TSdataArray, $id, array $rootLine, $returnPartArray)
static inArray(array $in_array, $item)
static getSignalSlotDispatcher()
static isLoaded($key, $exitOnError=FALSE)
static versioningPlaceholderClause($table)
static getUserNames($fields='username, usergroup, usergroup_cached_list, uid', $where='')
static getRecordLocalization($table, $uid, $language, $andWhereClause='')
static isRecordLocked($table, $uid)
static makeConfigForm($configArray, $defaults, $dataPrefix)
static getSpriteIcon($iconName, array $options=array(), array $overlays=array())
static setUpdateSignal($set='', $params='')
static & softRefParserObj($spKey)
static getTCAtypes($table, $rec, $useFieldNameAsKey=0)
static blindGroupNames($groups, $groupArray, $excludeBlindedFlag=0)
static getRecordRaw($table, $where='', $fields=' *')
static getTcaFieldConfiguration($table, $field)
static RTEsetup($RTEprop, $table, $field, $type='')
static isModuleSetInTBE_MODULES($modName)
static getFuncMenu($mainParams, $elementName, $currentValue, $menuItems, $script='', $addparams='')
static unsetMenuItems($modTSconfig, $itemArray, $TSref)
static implodeArrayForUrl($name, array $theArray, $str='', $skipBlank=FALSE, $rawurlencodeParamName=FALSE)
debug($variable='', $name=' *variable *', $line=' *line *', $file=' *file *', $recursiveDepth=3, $debugLevel=E_DEBUG)
static selectVersionsOfRecord($table, $uid, $fields=' *', $workspace=0, $includeDeletedRecords=FALSE, $row=NULL)
static getSpecConfParametersFromArray($pArr)
static getSQLselectableList($in_list, $tablename, $default_tablename)
static fixed_lgd_cs($string, $chars, $appendString='...')
static getPageForRootline($uid, $clause, $workspaceOL)
static fixVersioningPid($table, &$rr, $ignoreWorkspaceMatch=FALSE)
static getOriginalTranslationTable($table)
static getListGroupNames($fields='title, uid')
static getRecordPath($uid, $clause, $titleLimit, $fullTitleLimit=0)
static getSpecConfParts($str, $defaultExtras)
static getRecordTitlePrep($title, $titleLength=0)
static getHash($hash, $expTime=0)
static getPidForModTSconfig($table, $uid, $pid)
static buildScriptUrl($mainParams, $addParams, $script='')
static getLiveVersionOfRecord($table, $uid, $fields=' *')
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
static getExplicitAuthFieldValues()
static exec_foreign_table_where_query($fieldValue, $field='', $TSconfig=array(), $prefix='')
static inList($list, $item)
static xml2array($string, $NSprefix='', $reportDocTag=FALSE)
static getFileAbsFileName($filename, $onlyRelative=TRUE, $relToTYPO3_mainDir=FALSE)
static stripPathSitePrefix($path)
static $tcaTableTypeConfigurationCache
static getPagesTSconfig($id, $rootLine=NULL, $returnPartArray=FALSE)
static isTableLocalizable($table)
static splitTable_Uid($str)
const CONTEXT_IMAGEPREVIEW
static dateTimeAge($tstamp, $prefix=1, $date='')
static BEenableFields($table, $inv=0)
static getListViewLink($urlParameters=array(), $linkTitle='', $linkText='')
static deleteClause($table, $tableAlias='')
static replaceL10nModeFields($table, array $row)
static helpTextArray($table, $field)
static getSystemLanguages()
static TYPO3_copyRightNotice($showVersionNumber=TRUE)