258 return strpos($this->thisScript,
'?') === FALSE ? $this->thisScript .
'?' : $this->thisScript .
'&';
283 $this->act = $this->curUrlInfo[
'act'];
287 $this->setTarget = $this->curUrlArray[
'target'] !=
'-' ? $this->curUrlArray[
'target'] :
'';
288 if ($this->thisConfig[
'defaultLinkTarget'] && !isset($this->curUrlArray[
'target'])) {
289 $this->setTarget = $this->thisConfig[
'defaultLinkTarget'];
292 $this->setClass = $this->curUrlArray[
'class'] !=
'-' ? $this->curUrlArray[
'class'] :
'';
294 $this->setTitle = $this->curUrlArray[
'title'] !=
'-' ? $this->curUrlArray[
'title'] :
'';
296 $this->setParams = $this->curUrlArray[
'params'] !=
'-' ? $this->curUrlArray[
'params'] :
'';
300 unset($this->doc->JScodeArray[
'jumpToUrl']);
301 $this->doc->JScode .= $this->doc->wrapScriptTags($this->getJSCode());
331 $this->fileProcessor->init(array(),
$GLOBALS[
'TYPO3_CONF_VARS'][
'BE'][
'fileExtensions']);
341 if ((
string) $this->mode ===
'rte') {
354 $this->doc->bodyTagId =
'typo3-browse-links-php';
355 $this->doc->backPath =
$GLOBALS[
'BACK_PATH'];
357 $this->doc->getPageRenderer()->loadPrototype();
358 $this->doc->loadJavascriptLib(
'js/browse_links.js');
359 $this->doc->loadJavascriptLib(
'js/tree.js');
370 if (is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][$hookKey][
'browseLinksHook'])) {
371 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][$hookKey][
'browseLinksHook'] as $classData) {
373 if (!$processObject instanceof \
TYPO3\CMS\Core\
ElementBrowser\ElementBrowserHookInterface) {
374 throw new \UnexpectedValueException(
'$processObject must implement interface TYPO3\\CMS\\Core\\ElementBrowser\\ElementBrowserHookInterface', 1195039394);
378 $this->hookObjects[] = $processObject;
390 if ($this->mode ==
'wizard') {
392 if (count($currentValues) > 0) {
393 $currentValue = array_pop($currentValues);
398 $initialCurUrlArray = array(
399 'href' => $currentLinkParts[0],
400 'target' => $currentLinkParts[1],
401 'class' => $currentLinkParts[2],
402 'title' => $currentLinkParts[3],
403 'params' => $currentLinkParts[4]
407 : $initialCurUrlArray;
409 if (isset(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/class.browse_links.php'][
'extendUrlArray'])
410 && is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/class.browse_links.php'][
'extendUrlArray'])
415 'linkParts' => $currentLinkParts
417 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/class.browse_links.php'][
'extendUrlArray'] as $objRef) {
419 $processor->extendUrlArray($_params, $this);
422 $this->curUrlInfo = $this->
parseCurUrl($this->siteURL .
'?id=' . $this->curUrlArray[
'href'], $this->siteURL);
424 if ($this->curUrlInfo[
'pageid'] == 0 && $this->curUrlArray[
'href']) {
427 $this->curUrlInfo = $this->
parseCurUrl($this->curUrlArray[
'href'], $this->siteURL);
429 $currentLinkParts[0] = rawurldecode(substr($this->curUrlArray[
'href'], 5));
430 } elseif (file_exists(PATH_site . rawurldecode($this->curUrlArray[
'href']))) {
434 $this->curUrlInfo = $this->
parseCurUrl($this->siteURL . $this->curUrlArray[
'href'], $this->siteURL);
435 } elseif (strstr($this->curUrlArray[
'href'],
'@')) {
438 $currentLinkParts[0] = substr($this->curUrlArray[
'href'], 7);
440 $this->curUrlInfo = $this->
parseCurUrl(
'mailto:' . $this->curUrlArray[
'href'], $this->siteURL);
443 if (strpos($this->curUrlArray[
'href'],
'://') === FALSE) {
444 $currentLinkParts[0] =
'http://' . $this->curUrlArray[
'href'];
446 $this->curUrlInfo = $this->
parseCurUrl($currentLinkParts[0], $this->siteURL);
448 } elseif (!$this->curUrlArray[
'href']) {
449 $this->curUrlInfo = array();
452 $this->curUrlInfo = $this->
parseCurUrl($this->siteURL .
'?id=' . $this->curUrlArray[
'href'], $this->siteURL);
456 if ($this->curUrlArray[
'all']) {
459 $this->curUrlInfo = $this->
parseCurUrl($this->curUrlArray[
'href'], $this->siteURL);
469 $RTEtsConfigParts = explode(
':', $this->RTEtsConfigParams);
471 return BackendUtility::RTEsetup($RTEsetup[
'properties'], $RTEtsConfigParts[0], $RTEtsConfigParts[2], $RTEtsConfigParts[4]);
482 $addPassOnParams =
'';
483 if ((
string) $this->mode ==
'rte') {
484 $addPassOnParams .=
'&RTEtsConfigParams=' . rawurlencode($this->RTEtsConfigParams);
488 // This JavaScript is primarily for RTE/Link. jumpToUrl is used in the other cases as well... 489 var add_href=' .
GeneralUtility::quoteJSvalue($this->curUrlArray[
'href'] ?
'&curUrl[href]=' . rawurlencode($this->curUrlArray[
'href']) :
'') .
'; 501 function browse_links_setTarget(target) { // 503 add_target="&curUrl[target]="+encodeURIComponent(target); 505 function browse_links_setClass(cssClass) { // 506 cur_class = cssClass; 507 add_class = "&curUrl[class]=" + encodeURIComponent(cssClass); 509 function browse_links_setTitle(title) { // 511 add_title="&curUrl[title]="+encodeURIComponent(title); 513 function browse_links_setValue(value) { // 515 add_href="&curUrl[href]="+encodeURIComponent(value); 517 function browse_links_setParams(params) { // 519 add_params="&curUrl[params]="+encodeURIComponent(params); 523 if ($this->mode ==
'wizard') {
525 $this->P[
'fieldChangeFunc'] = array();
527 unset($this->P[
'fieldChangeFunc'][
'alert']);
529 foreach ($this->P[
'fieldChangeFunc'] as $v) {
531 window.opener.' . $v;
534 $P2[
'uid'] = $this->P[
'uid'];
535 $P2[
'pid'] = $this->P[
'pid'];
536 $P2[
'itemName'] = $this->P[
'itemName'];
537 $P2[
'formName'] = $this->P[
'formName'];
538 $P2[
'fieldChangeFunc'] = $this->P[
'fieldChangeFunc'];
540 $P2[
'params'][
'allowedExtensions'] = isset($this->P[
'params'][
'allowedExtensions']) ? $this->P[
'params'][
'allowedExtensions'] :
'';
541 $P2[
'params'][
'blindLinkOptions'] = isset($this->P[
'params'][
'blindLinkOptions']) ? $this->P[
'params'][
'blindLinkOptions'] :
'';
542 $P2[
'params'][
'blindLinkFields'] = isset($this->P[
'params'][
'blindLinkFields']) ? $this->P[
'params'][
'blindLinkFields']:
'';
545 function link_typo3Page(id,anchor) { // 546 updateValueInMainForm(id + (anchor ? anchor : "")); 550 function link_folder(folder) { // 551 updateValueInMainForm(folder); 555 function link_current() { // 556 if (cur_href!="http://" && cur_href!="mailto:") { 557 returnBeforeCleaned = cur_href; 558 if (returnBeforeCleaned.substr(0, 7) == "http://") { 559 returnToMainFormValue = returnBeforeCleaned.substr(7); 560 } else if (returnBeforeCleaned.substr(0, 7) == "mailto:") { 561 if (returnBeforeCleaned.substr(0, 14) == "mailto:mailto:") { 562 returnToMainFormValue = returnBeforeCleaned.substr(14); 564 returnToMainFormValue = returnBeforeCleaned.substr(7); 567 returnToMainFormValue = returnBeforeCleaned; 569 updateValueInMainForm(returnToMainFormValue); 574 function checkReference() { // 575 if (window.opener && window.opener.document && window.opener.document.' . $this->P[
'formName']
582 function updateValueInMainForm(input) { // 583 var field = checkReference(); 585 if (cur_target == "" && (cur_class != "" || cur_title != "" || cur_params != "")) { 588 if (cur_class == "" && (cur_title != "" || cur_params != "")) { 591 cur_class = cur_class.replace(/[\'\\"]/g, ""); 592 if (cur_class.indexOf(" ") != -1) { 593 cur_class = "\\"" + cur_class + "\\""; 595 if (cur_title == "" && cur_params != "") { 598 cur_title = cur_title.replace(/(^\\")|(\\"$)/g, ""); 599 if (cur_title.indexOf(" ") != -1) { 600 cur_title = "\\"" + cur_title + "\\""; 603 cur_params = cur_params.replace(/\\bid\\=.*?(\\&|$)/, ""); 605 input = input + " " + cur_target + " " + cur_class + " " + cur_title + " " + cur_params; 606 input = input.replace(/^\s+|\s+$/g, ""); 607 if(field.value && field.className.search(/textarea/) != -1) { 608 field.value += "\\n" + input; 620 function link_typo3Page(id,anchor) { // 622 self.parent.parent.renderPopup_addLink(theLink, cur_target, cur_class, cur_title); 625 function link_folder(folder) { // 627 self.parent.parent.renderPopup_addLink(theLink, cur_target, cur_class, cur_title); 630 function link_spec(theLink) { // 631 self.parent.parent.renderPopup_addLink(theLink, cur_target, cur_class, cur_title); 634 function link_current() { // 635 if (cur_href!="http://" && cur_href!="mailto:") { 636 self.parent.parent.renderPopup_addLink(cur_href, cur_target, cur_class, cur_title); 644 function jumpToUrl(URL,anchor) { // 645 if (URL.charAt(0) === \'?\') { 650 var theLocation = URL + add_act + add_mode + add_href + add_target + add_class + add_title + add_params' 652 .
'+(typeof(anchor)=="string"?anchor:""); 653 window.location.href = theLocation; 662 $pArr = explode(
'|', $this->bparams);
666 if ($pArr[4] && $pArr[5]) {
668 // Call a check function in the opener window (e.g. for uniqueness handling): 669 if (parent.window.opener) { 672 if (res.message) alert(res.message); 673 performAction = false; 676 alert("Error - reference to main window is not set properly!"); 683 if ($pArr[4] && $pArr[6]) {
685 // Call helper function to manage data in the opener window: 686 if (parent.window.opener) { 689 alert("Error - reference to main window is not set properly!"); 695 $JScodeActionMultiple =
'';
696 if ($pArr[4] && $pArr[7]) {
699 if (parent.window.opener) { 701 if (close) { focusOpenerAndClose(close); } 703 alert("Error - reference to main window is not set properly!"); 704 if (close) { parent.close(); } 707 $JScodeActionMultiple =
' 708 // Call helper function to manage data in the opener window: 709 if (parent.window.opener) { 711 . addslashes($pArr[0]) .
'"); 713 alert("Error - reference to main window is not set properly!"); 717 } elseif ($pArr[0] && !$pArr[1] && !$pArr[2]) {
719 addElement(filename,table+"_"+uid,fp,close); 723 if (setReferences()) { 724 parent.window.opener.group_change("add",' 729 alert("Error - reference to main window is not set properly!"); 731 focusOpenerAndClose(close); 734 $formFieldName =
'data[' . $pArr[0] .
'][' . $pArr[1] .
'][' . $pArr[2] .
']';
739 function launchView(url) { // 740 var thePreviewWindow=""; 741 thePreviewWindow = window.open("' .
$GLOBALS[
'BACK_PATH'] .
'show_item.php?table="+url,"ShowItem",' 742 .
'"height=300,width=410,status=0,menubar=0,resizable=0,location=0,directories=0,scrollbars=1,toolbar=0"); 743 if (thePreviewWindow && thePreviewWindow.focus) { 744 thePreviewWindow.focus(); 747 function setReferences() { // 748 if (parent.window.opener && parent.window.opener.content && parent.window.opener.content.document.editform' 750 targetDoc = parent.window.opener.content.document; 757 function insertElement(table, uid, type, filename, fp, filetype, imagefile, action, close) { // 758 var performAction = true; 760 // Call performing function and finish this action: 762 ' . $JScodeHelper . $JScodeAction .
' 766 var _hasActionMultipleCode = ' . (!empty($JScodeActionMultiple) ?
'true' :
'false') .
'; 767 function insertMultiple(table, uid) { 769 ' . $JScodeActionMultiple .
' 772 function addElement(elName, elValue, altElValue, close) { // 773 if (parent.window.opener && parent.window.opener.setFormValueFromBrowseWin) { 775 focusOpenerAndClose(close); 777 alert("Error - reference to main window is not set properly!"); 781 function focusOpenerAndClose(close) { // 782 BrowseLinks.focusOpenerAndClose(close); 786 if (isset(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/class.browse_links.php'][
'extendJScode'])
787 && is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/class.browse_links.php'][
'extendJScode'])
793 'wizardUpdate' => $update,
794 'addPassOnParams' => $addPassOnParams
796 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/class.browse_links.php'][
'extendJScode'] as $objRef) {
798 $JScode .= $processor->extendJScode($_params, $this);
814 switch ((
string) $this->mode) {
836 return array($data, $store);
855 $content = $this->doc->startPage(
'RTE link');
857 $content .= $this->doc->getFlashMessages();
860 $blindLinkOptions = isset($this->thisConfig[
'blindLinkOptions'])
863 $pBlindLinkOptions = isset($this->P[
'params'][
'blindLinkOptions'])
866 $allowedItems = array_diff(array(
'page',
'file',
'folder',
'url',
'mail',
'spec'), $blindLinkOptions, $pBlindLinkOptions);
869 foreach ($this->hookObjects as $hookObject) {
870 $allowedItems = $hookObject->addAllowedItems($allowedItems);
874 $blindLinkFields = isset($this->thisConfig[
'blindLinkFields'])
877 $pBlindLinkFields = isset($this->P[
'params'][
'blindLinkFields'])
880 $allowedFields = array_diff(array(
'target',
'title',
'class',
'params'), $blindLinkFields, $pBlindLinkFields);
883 if (!in_array($this->act, $allowedItems)) {
884 $this->act = reset($allowedItems);
889 $menuDef[
'removeLink'][
'isActive'] = $this->act ==
'removeLink';
890 $menuDef[
'removeLink'][
'label'] =
$GLOBALS[
'LANG']->getLL(
'removeLink', TRUE);
891 $menuDef[
'removeLink'][
'url'] =
'#';
892 $menuDef[
'removeLink'][
'addParams'] =
'onclick="self.parent.parent.renderPopup_unLink();return false;"';
894 if (in_array(
'page', $allowedItems)) {
895 $menuDef[
'page'][
'isActive'] = $this->act ==
'page';
896 $menuDef[
'page'][
'label'] =
$GLOBALS[
'LANG']->getLL(
'page', TRUE);
897 $menuDef[
'page'][
'url'] =
'#';
900 if (in_array(
'file', $allowedItems)) {
901 $menuDef[
'file'][
'isActive'] = $this->act ==
'file';
902 $menuDef[
'file'][
'label'] =
$GLOBALS[
'LANG']->getLL(
'file', TRUE);
903 $menuDef[
'file'][
'url'] =
'#';
906 if (in_array(
'folder', $allowedItems)) {
907 $menuDef[
'folder'][
'isActive'] = $this->act ==
'folder';
908 $menuDef[
'folder'][
'label'] =
$GLOBALS[
'LANG']->getLL(
'folder', TRUE);
909 $menuDef[
'folder'][
'url'] =
'#';
912 if (in_array(
'url', $allowedItems)) {
913 $menuDef[
'url'][
'isActive'] = $this->act ==
'url';
914 $menuDef[
'url'][
'label'] =
$GLOBALS[
'LANG']->getLL(
'extUrl', TRUE);
915 $menuDef[
'url'][
'url'] =
'#';
918 if (in_array(
'mail', $allowedItems)) {
919 $menuDef[
'mail'][
'isActive'] = $this->act ==
'mail';
920 $menuDef[
'mail'][
'label'] =
$GLOBALS[
'LANG']->getLL(
'email', TRUE);
921 $menuDef[
'mail'][
'url'] =
'#';
924 if (is_array($this->thisConfig[
'userLinks.']) && in_array(
'spec', $allowedItems)) {
925 $menuDef[
'spec'][
'isActive'] = $this->act ==
'spec';
926 $menuDef[
'spec'][
'label'] =
$GLOBALS[
'LANG']->getLL(
'special', TRUE);
927 $menuDef[
'spec'][
'url'] =
'#';
931 foreach ($this->hookObjects as $hookObject) {
932 $menuDef = $hookObject->modifyMenuDefinition($menuDef);
934 $content .= $this->doc->getTabMenuRaw($menuDef);
936 $content .= $this->
printCurrentUrl($this->curUrlInfo[
'info']) .
'<br />';
938 switch ($this->act) {
945 <form action="" name="lurlform" id="lurlform"> 946 <table border="0" cellpadding="2" cellspacing="1" id="typo3-linkMail"> 948 <td style="width: 96px;">' .
$GLOBALS[
'LANG']->getLL(
'emailAddress', TRUE) .
':</td> 949 <td><input type="text" name="lemail"' . $this->doc->formWidth(20) .
' value="' 950 . htmlspecialchars(($this->curUrlInfo[
'act'] ==
'mail' ? $this->curUrlInfo[
'info'] :
''))
951 .
'" /> ' .
'<input type="submit" value="' .
$GLOBALS[
'LANG']->getLL(
'setLink', TRUE)
952 .
'" onclick="browse_links_setTarget(\'\');browse_links_setValue(\'mailto:\'+' 953 .
'document.lurlform.lemail.value); return link_current();" /></td> 965 <form action="" name="lurlform" id="lurlform"> 966 <table border="0" cellpadding="2" cellspacing="1" id="typo3-linkURL"> 968 <td style="width: 96px;">URL:</td> 969 <td><input type="text" name="lurl"' . $this->doc->formWidth(30) .
' value="' 970 . htmlspecialchars(($this->curUrlInfo[
'act'] ==
'url' ? $this->curUrlInfo[
'info'] :
'http://'))
971 .
'" /> ' .
'<input type="submit" value="' .
$GLOBALS[
'LANG']->getLL(
'setLink', TRUE)
972 .
'" onclick="browse_links_setValue(document.lurlform.lurl.value); return link_current();" /></td> 983 $tree = $foldertree->getBrowsableTree();
984 if (!$this->curUrlInfo[
'value'] || $this->curUrlInfo[
'act'] != $this->act) {
987 $cmpPath = $this->curUrlInfo[
'value'];
995 $fileOrFolderObject = NULL;
998 }
catch (\Exception $e) {
1002 if ($fileOrFolderObject instanceof
Folder) {
1005 } elseif ($fileOrFolderObject instanceof \
TYPO3\CMS\Core\Resource\FileInterface) {
1009 }
catch (\Exception $e) {
1018 }
catch (\Exception $e) {
1030 if (
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.uploadFieldsInTopOfEB')) {
1031 $content .= $uploadForm;
1036 $allowedExtensions = isset($this->P[
'params'][
'allowedExtensions']) ? $this->P[
'params'][
'allowedExtensions'] :
'';
1039 $this->doc->JScode .= $this->doc->wrapScriptTags(
' 1040 Tree.ajaxID = "SC_alt_file_navframe::expandCollapse"; 1044 Wrapper table for folder tree / file/folder list: 1046 <table border="0" cellpadding="0" cellspacing="0" id="typo3-linkFiles"> 1048 <td class="c-wCell" valign="top">' 1049 . $this->
barheader((
$GLOBALS[
'LANG']->getLL(
'folderTree') .
':')) . $tree .
'</td> 1050 <td class="c-wCell" valign="top">' . $files .
'</td> 1056 if (!
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.uploadFieldsInTopOfEB')) {
1057 $content .= $uploadForm;
1059 $content .= $createFolder .
'<br />';
1062 if (is_array($this->thisConfig[
'userLinks.'])) {
1064 $v = $this->thisConfig[
'userLinks.'];
1065 foreach ($v as $k2 => $value) {
1067 if (substr($k2, -1) ==
'.' && is_array($v[$k2i .
'.'])) {
1069 $title = trim($v[$k2i]);
1071 $title = $v[$k2i .
'.'][
'url'];
1073 $title =
$GLOBALS[
'LANG']->sL($title);
1076 $description = $v[$k2i .
'.'][
'description']
1077 ?
$GLOBALS[
'LANG']->sL($v[($k2i .
'.')][
'description'], TRUE) .
'<br />' 1081 if (isset($v[$k2i .
'.'][
'target'])) {
1084 $v[$k2i .
'.'][
'url'] = str_replace(
'###_URL###', $this->siteURL, $v[$k2i .
'.'][
'url']);
1085 if (substr($v[$k2i .
'.'][
'url'], 0, 7) ===
'http://' || substr($v[$k2i .
'.'][
'url'], 0, 7) ===
'mailto:') {
1091 $A = array(
'<a href="#" onclick="' . htmlspecialchars($onClickEvent) .
'return false;">',
'</a>');
1095 <td class="bgColor4">' . $A[0] .
'<strong>' . htmlspecialchars($title)
1096 . ($this->curUrlInfo[
'info'] == $v[$k2i .
'.'][
'url']
1099 'gfx/blinkarrow_right.gif',
1100 'width="5" height="9"' 1101 ) .
' class="c-blinkArrowR" alt="" />' 1103 .
'</strong><br />' . $description . $A[1] .
'</td> 1113 Special userdefined menu: 1115 <table border="0" cellpadding="1" cellspacing="1" id="typo3-linkSpecial"> 1117 <td class="bgColor5 c-wCell" valign="top"><strong>' 1118 .
$GLOBALS[
'LANG']->getLL(
'special', TRUE) .
'</strong></td> 1120 ' . implode(
'', $subcats) .
' 1128 $pageTree->ext_showPageId =
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.pageTree.showPageIdWithTitle');
1129 $pageTree->ext_showNavTitle =
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.pageTree.showNavTitle');
1130 $pageTree->addField(
'nav_title');
1131 $tree = $pageTree->getBrowsableTree();
1137 Wrapper table for page tree / record list: 1139 <table border="0" cellpadding="0" cellspacing="0" id="typo3-linkPages"> 1141 <td class="c-wCell" valign="top">' 1143 . $this->getTemporaryTreeMountCancelNotice()
1145 <td class="c-wCell" valign="top">' . $cElements .
'</td> 1152 foreach ($this->hookObjects as $hookObject) {
1153 $content .= $hookObject->getTab($this->act);
1156 if (in_array(
'params', $allowedFields, TRUE)) {
1159 Selecting params for link: 1161 <form action="" name="lparamsform" id="lparamsform"> 1162 <table border="0" cellpadding="2" cellspacing="1" id="typo3-linkParams"> 1164 <td style="width: 96px;">' .
$GLOBALS[
'LANG']->getLL(
'params', TRUE) .
'</td> 1165 <td><input type="text" name="lparams" class="typo3-link-input" onchange="' 1166 .
'browse_links_setParams(this.value);" value="' . htmlspecialchars($this->setParams)
1173 if (in_array(
'class', $allowedFields, TRUE)) {
1176 Selecting class for link: 1178 <form action="" name="lclassform" id="lclassform"> 1179 <table border="0" cellpadding="2" cellspacing="1" id="typo3-linkClass"> 1181 <td style="width: 96px;">' .
$GLOBALS[
'LANG']->getLL(
'class', TRUE) .
'</td> 1182 <td><input type="text" name="lclass" class="typo3-link-input" onchange="' 1183 .
'browse_links_setClass(this.value);" value="' . htmlspecialchars($this->setClass)
1190 if (in_array(
'title', $allowedFields, TRUE)) {
1193 Selecting title for link: 1195 <form action="" name="ltitleform" id="ltitleform"> 1196 <table border="0" cellpadding="2" cellspacing="1" id="typo3-linkTitle"> 1198 <td style="width: 96px;">' .
$GLOBALS[
'LANG']->getLL(
'title', TRUE) .
'</td> 1199 <td><input type="text" name="ltitle" class="typo3-link-input" onchange="' 1200 .
'browse_links_setTitle(this.value);" value="' . htmlspecialchars($this->setTitle)
1208 if (isset(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/class.browse_links.php'][
'addFields_PageLink'])
1209 && is_array(
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/class.browse_links.php'][
'addFields_PageLink'])
1215 foreach (
$GLOBALS[
'TYPO3_CONF_VARS'][
'SC_OPTIONS'][
'typo3/class.browse_links.php'][
'addFields_PageLink'] as $objRef) {
1217 $content .= $processor->addFields($_params, $this);
1221 if ($this->act !=
'mail' && in_array(
'target', $allowedFields, TRUE)) {
1225 Selecting target for link: 1227 <form action="" name="ltargetform" id="ltargetform"> 1228 <table border="0" cellpadding="2" cellspacing="1" id="typo3-linkTarget"> 1230 <td>' .
$GLOBALS[
'LANG']->getLL(
'target', TRUE) .
':</td> 1231 <td><input type="text" name="ltarget" onchange="browse_links_setTarget(this.value);" value="' 1232 . htmlspecialchars($this->setTarget) .
'"' . $this->doc->formWidth(10) .
' /></td> 1234 <select name="ltarget_type" onchange="browse_links_setTarget(' 1235 .
'this.options[this.selectedIndex].value);document.ltargetform.ltarget.value=' 1236 .
'this.options[this.selectedIndex].value;this.selectedIndex=0;"> 1238 <option value="_top">' .
$GLOBALS[
'LANG']->getLL(
'top', TRUE) .
'</option> 1239 <option value="_blank">' .
$GLOBALS[
'LANG']->getLL(
'newWindow', TRUE) .
'</option> 1243 if (($this->curUrlInfo[
'act'] ==
'page' || $this->curUrlInfo[
'act'] ==
'file' || $this->curUrlInfo[
'act'] ==
'folder')
1244 && $this->curUrlArray[
'href'] && $this->curUrlInfo[
'act'] == $this->act
1247 <input type="submit" value="' .
$GLOBALS[
'LANG']->getLL(
'update', TRUE)
1248 .
'" onclick="return link_current();" />';
1251 if (document.ltargetform.popup_width.options[document.ltargetform.popup_width.selectedIndex].value>0' 1252 .
' && document.ltargetform.popup_height.options[document.ltargetform.popup_height.selectedIndex].value>0) { 1253 document.ltargetform.ltarget.value = document.ltargetform.popup_width.options[' 1254 .
'document.ltargetform.popup_width.selectedIndex].value+"x"' 1255 .
'+document.ltargetformbrowse_links_setTarget.popup_height.options[' 1256 .
'document.ltargetform.popup_height.selectedIndex].value; 1257 browse_links_setTarget(document.ltargetform.ltarget.value); 1258 browse_links_setClass(document.lclassform.lclass.value); 1259 browse_links_setTitle(document.ltitleform.ltitle.value); 1260 browse_links_setParams(document.lparamsform.lparams.value); 1261 document.ltargetform.popup_width.selectedIndex=0; 1262 document.ltargetform.popup_height.selectedIndex=0; 1268 <td>' .
$GLOBALS[
'LANG']->getLL(
'target_popUpWindow', TRUE) .
':</td> 1270 <select name="popup_width" onchange="' . htmlspecialchars($selectJS) .
'"> 1271 <option value="0">' .
$GLOBALS[
'LANG']->getLL(
'target_popUpWindow_width', TRUE) .
'</option> 1272 <option value="300">300</option> 1273 <option value="400">400</option> 1274 <option value="500">500</option> 1275 <option value="600">600</option> 1276 <option value="700">700</option> 1277 <option value="800">800</option> 1280 <select name="popup_height" onchange="' . htmlspecialchars($selectJS) .
'"> 1281 <option value="0">' .
$GLOBALS[
'LANG']->getLL(
'target_popUpWindow_height', TRUE) .
'</option> 1282 <option value="200">200</option> 1283 <option value="300">300</option> 1284 <option value="400">400</option> 1285 <option value="500">500</option> 1286 <option value="600">600</option> 1293 $content .= $ltarget;
1295 $content .=
'<br /><br />';
1298 $content .= $this->doc->endPage();
1299 $content = $this->doc->insertStylesAndJS($content);
1309 public function main_db() {
1311 $content = $this->doc->startPage(
'TBE record selector');
1313 $pArr = explode(
'|', $this->bparams);
1320 $pagetree->ext_pArrPages = $tables ===
'pages' ? 1 : 0;
1321 $pagetree->ext_showNavTitle =
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.pageTree.showNavTitle');
1322 $pagetree->ext_showPageId =
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.pageTree.showPageIdWithTitle');
1323 $pagetree->addField(
'nav_title');
1326 if (($tables !==
'') && ($tables !==
'*')) {
1328 $onlyRootLevel = TRUE;
1329 foreach ($tablesArr as $currentTable) {
1330 $tableTca =
$GLOBALS[
'TCA'][$currentTable];
1331 if (isset($tableTca)) {
1332 if (!isset($tableTca[
'ctrl'][
'rootLevel']) || ((
int)$tableTca[
'ctrl'][
'rootLevel']) != 1) {
1333 $onlyRootLevel = FALSE;
1337 if ($onlyRootLevel) {
1344 $tree = $pagetree->getBrowsableTree();
1346 $cElements = $this->TBE_expandPage($tables);
1351 Wrapper table for page tree / record list: 1353 <table border="0" cellpadding="0" cellspacing="0" id="typo3-EBrecords"> 1356 $content .=
'<td class="c-wCell" valign="top">' 1358 . $this->getTemporaryTreeMountCancelNotice()
1361 $content .=
'<td class="c-wCell" valign="top">' . $cElements .
'</td> 1366 $content .=
'<br /><br />';
1368 $content .= $this->doc->endPage();
1369 $content = $this->doc->insertStylesAndJS($content);
1379 public function main_file() {
1381 $this->doc->getDragDropCode(
'folders');
1382 $this->doc->JScode .= $this->doc->wrapScriptTags(
' 1383 Tree.ajaxID = "SC_alt_file_navframe::expandCollapse"; 1386 $content = $this->doc->startPage(
'TBE file selector');
1388 $content .= $this->doc->getFlashMessages();
1390 $pArr = explode(
'|', $this->bparams);
1393 $allowed = $pArr[3];
1394 if ($allowed !==
'sys_file' && $allowed !==
'*' && !empty($allowed)) {
1395 $allowedFileExtensions = $allowed;
1397 $this->storages =
$GLOBALS[
'BE_USER']->getFileStorages();
1398 if (isset($allowedFileExtensions)) {
1401 $filterObject->setAllowedFileExtensions($allowedFileExtensions);
1404 foreach ($this->storages as $storage) {
1405 $storage->addFileAndFolderNameFilter(array($filterObject,
'filterFileList'));
1409 $this->selectedFolder = FALSE;
1411 $fileOrFolderObject = NULL;
1417 }
catch (\
TYPO3\CMS\Core\Resource\Exception $accessException) {
1421 if ($fileOrFolderObject instanceof \
TYPO3\CMS\Core\Resource\
Folder) {
1423 $this->selectedFolder = $fileOrFolderObject;
1424 } elseif ($fileOrFolderObject instanceof \
TYPO3\CMS\Core\Resource\FileInterface) {
1426 $this->selectedFolder = $fileOrFolderObject->getParentFolder();
1430 if (!$this->selectedFolder) {
1432 $this->selectedFolder =
$GLOBALS[
'BE_USER']->getDefaultUploadFolder();
1433 }
catch (\Exception $e) {
1440 if ($this->selectedFolder) {
1441 $uploadForm = $this->
uploadForm($this->selectedFolder);
1442 $createFolder = $this->
createFolder($this->selectedFolder);
1445 if (
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.uploadFieldsInTopOfEB')) {
1446 $content .= $uploadForm;
1449 $noThumbs =
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.noThumbsInEB');
1450 $_MOD_SETTINGS = array();
1453 $_MOD_MENU = array(
'displayThumbs' =>
'');
1454 $_MCONF[
'name'] =
'file_list';
1457 $noThumbs = $noThumbs ?: !$_MOD_SETTINGS[
'displayThumbs'];
1461 $folderTree->ext_noTempRecyclerDirs = $this->mode ==
'filedrag';
1462 $tree = $folderTree->getBrowsableTree();
1463 list(, , $specUid) = explode(
'_', $this->PM);
1464 if ($this->selectedFolder) {
1465 if ($this->mode ==
'filedrag') {
1466 $files = $this->
TBE_dragNDrop($this->selectedFolder, $pArr[3]);
1468 $files = $this->
TBE_expandFolder($this->selectedFolder, $pArr[3], $noThumbs);
1478 Wrapper table for folder tree / file list: 1480 <table border="0" cellpadding="0" cellspacing="0" id="typo3-EBfiles"> 1482 <td class="c-wCell" valign="top">' . $this->
barheader((
$GLOBALS[
'LANG']->getLL(
'folderTree') .
':'))
1484 <td class="c-wCell" valign="top">' . $files .
'</td> 1489 if (!
$GLOBALS[
'BE_USER']->getTSConfigVal(
'options.uploadFieldsInTopOfEB')) {
1490 $content .= $uploadForm;
1492 $content .= $createFolder;
1494 $content .=
'<br /><br />';
1496 $this->doc->JScode .= $this->doc->wrapScriptTags(
'BrowseLinks.addElements(' . json_encode($this->elements) .
');');
1498 $content .= $this->doc->endPage();
1499 $content = $this->doc->insertStylesAndJS($content);
1511 $this->doc->getDragDropCode(
'folders');
1513 $this->doc->JScode .= $this->doc->wrapScriptTags(
' 1514 Tree.ajaxID = "SC_alt_file_navframe::expandCollapse"; 1517 $content = $this->doc->startPage(
'TBE folder selector');
1519 $content .= $this->doc->getFlashMessages();
1525 if ($this->selectedFolder) {
1526 $createFolder = $this->
createFolder($this->selectedFolder);
1533 $folderTree->ext_noTempRecyclerDirs = $this->mode ==
'filedrag';
1534 $tree = $folderTree->getBrowsableTree(FALSE);
1535 list(, , $specUid) = explode(
'_', $this->PM);
1536 if ($this->selectedFolder) {
1537 if ($this->mode ==
'filedrag') {
1547 Wrapper table for folder tree / folder list: 1549 <table border="0" cellpadding="0" cellspacing="0" id="typo3-EBfiles"> 1551 <td class="c-wCell" valign="top">' . $this->
barheader((
$GLOBALS[
'LANG']->getLL(
'folderTree') .
':'))
1553 <td class="c-wCell" valign="top">' . $folders .
'</td> 1558 $content .= $createFolder;
1560 $content .=
'<br /><br />';
1562 $content .= $this->doc->endPage();
1563 $content = $this->doc->insertStylesAndJS($content);
1583 if (!$this->
expandPage && $this->curUrlInfo[
'cElement']) {
1585 $expPageId = $this->curUrlInfo[
'pageid'];
1589 && \
TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($expPageId)
1590 &&
$GLOBALS[
'BE_USER']->isInWebMount($expPageId)
1598 $out .= $picon .
'<br />';
1600 $res =
$GLOBALS[
'TYPO3_DB']->exec_SELECTquery(
1601 'uid,header,hidden,starttime,endtime,fe_group,CType,colPos,bodytext',
1608 $cc =
$GLOBALS[
'TYPO3_DB']->sql_num_rows($res);
1611 while ($row =
$GLOBALS[
'TYPO3_DB']->sql_fetch_assoc($res)) {
1614 if ($this->curUrlInfo[
'act'] ==
'page' && $this->curUrlInfo[
'cElement'] == $row[
'uid']) {
1616 .
' class="c-blinkArrowL" alt="" />';
1622 .
'.gif'),
'width="18" height="16"') .
' alt="" />' . $arrCol
1624 . $icon . BackendUtility::getRecordTitle('tt_content', $row, TRUE) . '</a><br />'; 1625 // Finding internal anchor points: 1626 if (GeneralUtility::inList('text,textpic', $row['CType'])) { 1627 $split = preg_split('/(<a[^>]+name=[\'"]?([^
"\'>[:space:]]+)[\'"]?[^>]*>)/i
', $row['bodytext
'], -1, PREG_SPLIT_DELIM_CAPTURE); 1628 foreach ($split as $skey => $sval) { 1629 if ($skey % 3 == 2) { 1630 // Putting list element HTML together: 1631 $sval = substr($sval, 0, 100); 1632 $out .= '<img
' . IconUtility::skinImg($GLOBALS['BACK_PATH
'], 'gfx/ol/line.gif
', 1633 'width=
"18" height=
"16"') . ' alt=
"" />
' 1634 . '<img
' . IconUtility::skinImg($GLOBALS['BACK_PATH
'], ('gfx/ol/join
' 1635 . ($skey + 3 > count($split) ? 'bottom
' : '') . '.gif
'), 'width=
"18" height=
"16"') 1636 . ' alt=
"" />
' . '<a href=
"#" onclick=
"return link_typo3Page(' . GeneralUtility::quoteJSvalue($expPageId) 1637 . ',' . GeneralUtility::quoteJSvalue('#' . $sval) . ');">
' . htmlspecialchars((' <A>
' . $sval)) 1654 public function TBE_expandPage($tables) { 1656 if ($this->expandPage >= 0 1657 && \TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($this->expandPage) 1658 && $GLOBALS['BE_USER
']->isInWebMount($this->expandPage) 1660 // Set array with table names to list: 1661 if (trim($tables) === '*
') { 1662 $tablesArr = array_keys($GLOBALS['TCA
']); 1664 $tablesArr = GeneralUtility::trimExplode(',
', $tables, TRUE); 1667 // Headline for selecting records: 1668 $out .= $this->barheader($GLOBALS['LANG
']->getLL('selectRecords
') . ':
'); 1669 // Create the header, showing the current page for which the listing is. 1670 // Includes link to the page itself, if pages are amount allowed tables. 1671 $titleLen = (int)$GLOBALS['BE_USER
']->uc['titleLen
']; 1672 $mainPageRec = BackendUtility::getRecordWSOL('pages
', $this->expandPage); 1677 if (is_array($mainPageRec)) { 1678 $picon = IconUtility::getSpriteIconForRecord('pages
', $mainPageRec); 1679 if (in_array('pages
', $tablesArr)) { 1680 $ATag = '<a href=
"#" onclick=
"return insertElement(\'pages\', \'' . $mainPageRec['uid'] . '\', \'db\', ' 1681 . GeneralUtility::quoteJSvalue($mainPageRec['title']) . ', \'\', \'\', \'\',\'\',1);">
'; 1682 $ATag2 = '<a href=
"#" onclick=
"return insertElement(\'pages\', \'' . $mainPageRec['uid'] . '\', \'db\', ' 1683 . GeneralUtility::quoteJSvalue($mainPageRec['title']) . ', \'\', \'\', \'\',\'\',0);">
'; 1687 $pBicon = $ATag2 ? '<img
' 1688 . IconUtility::skinImg($GLOBALS['BACK_PATH
'], 'gfx/plusbullet2.gif
', 'width=
"18" height=
"16"') 1689 . ' alt=
"" />
' : ''; 1690 $pText = htmlspecialchars(GeneralUtility::fixed_lgd_cs($mainPageRec['title
'], $titleLen)); 1691 $out .= $picon . $ATag2 . $pBicon . $ATag_e . $ATag . $pText . $ATag_e . '<br />
'; 1692 // Initialize the record listing: 1693 $id = $this->expandPage; 1694 $pointer = \TYPO3\CMS\Core\Utility\MathUtility::forceIntegerInRange($this->pointer, 0, 100000); 1695 $perms_clause = $GLOBALS['BE_USER
']->getPagePermsClause(1); 1696 $pageInfo = BackendUtility::readPageAccess($id, $perms_clause); 1697 // Generate the record list: 1699 if (is_object($this->recordList)) { 1700 $dbList = $this->recordList; 1702 $dbList = GeneralUtility::makeInstance('TYPO3\\CMS\\Backend\\
RecordList\\ElementBrowserRecordList
'); 1704 $dbList->thisScript = $this->thisScript; 1705 $dbList->backPath = $GLOBALS['BACK_PATH
']; 1706 $dbList->thumbs = 0; 1707 $dbList->calcPerms = $GLOBALS['BE_USER
']->calcPerms($pageInfo); 1708 $dbList->noControlPanels = 1; 1709 $dbList->clickMenuEnabled = 0; 1710 $dbList->tableList = implode(',
', $tablesArr); 1711 $pArr = explode('|
', $this->bparams); 1712 // a string like "data[pages][79][storage_pid]" 1713 $fieldPointerString = $pArr[0]; 1714 // parts like: data, pages], 79], storage_pid] 1715 $fieldPointerParts = explode('[
', $fieldPointerString); 1716 $relatingTableName = substr($fieldPointerParts[1], 0, -1); 1717 $relatingFieldName = substr($fieldPointerParts[3], 0, -1); 1718 if ($relatingTableName && $relatingFieldName) { 1719 $dbList->setRelatingTableAndField($relatingTableName, $relatingFieldName); 1721 $dbList->start($id, GeneralUtility::_GP('table
'), $pointer, GeneralUtility::_GP('search_field
'), 1722 GeneralUtility::_GP('search_levels
'), GeneralUtility::_GP('showLimit
') 1724 $dbList->setDispFields(); 1725 $dbList->generateList(); 1726 // Add the HTML for the record list to output variable: 1727 $out .= $dbList->HTMLcode; 1728 // Add support for fieldselectbox in singleTableMode 1729 if ($dbList->table) { 1730 $out .= $dbList->fieldSelectBox($dbList->table); 1732 $out .= $dbList->getSearchBox(); 1734 // Return accumulated content: 1745 public function TBE_expandSubFolders(Folder $folder) { 1747 if ($folder->checkActionPermission('read
')) { 1748 $content .= $this->folderList($folder); 1750 // Return accumulated content for folderlisting: 1754 /****************************************************************** 1758 ******************************************************************/ 1767 public function expandFolder(Folder $folder, $extensionList = '') { 1769 $renderFolders = $this->act === 'folder
'; 1770 if ($folder->checkActionPermission('read
')) { 1771 // Create header for file/folder listing: 1772 if ($renderFolders) { 1773 $out = $this->barheader($GLOBALS['LANG
']->getLL('folders
') . ':
'); 1775 $out = $this->barheader($GLOBALS['LANG
']->getLL('files
') . ':
'); 1777 // Prepare current path value for comparison (showing red arrow) 1778 $currentIdentifier = ''; 1779 if ($this->curUrlInfo['value
']) { 1780 $currentIdentifier = $this->curUrlInfo['info
']; 1782 // Create header element; The folder from which files are listed. 1783 $titleLen = (int)$GLOBALS['BE_USER
']->uc['titleLen
']; 1784 $folderIcon = IconUtility::getSpriteIconForResource($folder); 1785 $folderIcon .= htmlspecialchars(GeneralUtility::fixed_lgd_cs($folder->getIdentifier(), $titleLen)); 1786 $picon = '<a href=
"#" onclick=
"return link_folder(' . GeneralUtility::quoteJSvalue('file:' . $folder->getCombinedIdentifier()) . ');">
' 1787 . $folderIcon . '</a>
'; 1788 if ($this->curUrlInfo['act
'] == 'folder
' && $currentIdentifier == $folder->getCombinedIdentifier()) { 1790 . IconUtility::skinImg($GLOBALS['BACK_PATH
'], 'gfx/blinkarrow_left.gif
', 'width=
"5" height=
"9"') 1791 . ' class=
"c-blinkArrowL" alt=
"" />
'; 1793 $out .= $picon . '<br />
'; 1794 // Get files from the folder: 1795 if ($renderFolders) { 1796 $items = $folder->getSubfolders(); 1798 $items = $this->getFilesInFolder($folder, $extensionList); 1801 $totalItems = count($items); 1802 foreach ($items as $fileOrFolderObject) { 1804 if ($renderFolders) { 1805 $fileIdentifier = $fileOrFolderObject->getCombinedIdentifier(); 1806 $overlays = array(); 1807 if ($fileOrFolderObject instanceof \TYPO3\CMS\Core\Resource\InaccessibleFolder) { 1808 $overlays = array('status-overlay-locked
' => array()); 1810 $icon = IconUtility::getSpriteIcon( 1811 IconUtility::mapFileExtensionToSpriteIconName('folder
'), 1812 array('title
' => $fileOrFolderObject->getName()), 1814 $itemUid = 'file:
' . $fileIdentifier; 1816 $fileIdentifier = $fileOrFolderObject->getUid(); 1818 $fileExtension = $fileOrFolderObject->getExtension(); 1819 // Get size and icon: 1820 $size = ' (
' . GeneralUtility::formatSize($fileOrFolderObject->getSize()) . 'bytes)
'; 1821 $icon = IconUtility::getSpriteIconForResource($fileOrFolderObject, array('title
' => $fileOrFolderObject->getName() . $size)); 1822 $itemUid = 'file:
' . $fileIdentifier; 1824 // If the listed file turns out to be the CURRENT file, then show blinking arrow: 1825 if (($this->curUrlInfo['act
'] == 'file
' || $this->curUrlInfo['act
'] == 'folder
') 1826 && $currentIdentifier == $fileIdentifier 1828 $arrCol = '<img
' . IconUtility::skinImg($GLOBALS['BACK_PATH
'], 'gfx/blinkarrow_left.gif
', 1829 'width=
"5" height=
"9"') . ' class=
"c-blinkArrowL" alt=
"" />
'; 1833 // Put it all together for the file element: 1836 IconUtility::skinImg( 1837 $GLOBALS['BACK_PATH
'], 1838 ('gfx/ol/join
' . ($c == $totalItems ? 'bottom
' : '') . '.gif
'), 1839 'width=
"18" height=
"16"' 1840 ) . ' alt=
"" />
' . $arrCol . 1841 '<a href=
"#" onclick=
"return link_folder(' . GeneralUtility::quoteJSvalue($itemUid) . ');">
' . 1843 htmlspecialchars(GeneralUtility::fixed_lgd_cs($fileOrFolderObject->getName(), $titleLen)) . 1859 public function TBE_expandFolder(Folder $folder, $extensionList = '', $noThumbs = FALSE) { 1860 if (!$folder->checkActionPermission('read
')) { 1863 $extensionList = $extensionList == '*
' ? '' : $extensionList; 1864 $files = $this->getFilesInFolder($folder, $extensionList); 1865 return $this->fileList($files, $folder, $noThumbs); 1876 protected function fileList(array $files, Folder $folder = NULL, $noThumbs = FALSE) { 1880 // Create headline (showing number of files): 1881 $filesCount = count($files); 1882 $out .= $this->barheader(sprintf($GLOBALS['LANG
']->getLL('files
') . ' (%s):
', $filesCount)); 1883 $out .= '<div
id=
"filelist">
'; 1884 $out .= $this->getBulkSelector($filesCount); 1885 $titleLen = (int)$GLOBALS['BE_USER
']->uc['titleLen
']; 1886 // Create the header of current folder: 1888 $folderIcon = IconUtility::getSpriteIconForResource($folder); 1889 $lines[] = '<tr
class=
"t3-row-header">
1890 <td colspan=
"4">
' . $folderIcon 1891 . htmlspecialchars(GeneralUtility::fixed_lgd_cs($folder->getIdentifier(), $titleLen)) . '</td>
1894 if ($filesCount == 0) { 1896 <tr
class=
"file_list_normal">
1897 <td colspan=
"4">No files found.</td>
1900 // Traverse the file list: 1902 foreach ($files as $fileObject) { 1903 $fileExtension = $fileObject->getExtension(); 1904 // Thumbnail/size generation: 1906 if (GeneralUtility::inList(strtolower($GLOBALS['TYPO3_CONF_VARS
']['GFX
']['imagefile_ext
']), strtolower($fileExtension)) && !$noThumbs) { 1907 $imageUrl = $fileObject->process( 1908 \TYPO3\CMS\Core\Resource\ProcessedFile::CONTEXT_IMAGEPREVIEW, 1909 array('width
' => 64, 'height
' => 64) 1910 )->getPublicUrl(TRUE); 1912 $fileObject->getProperty('width
'), 1913 $fileObject->getProperty('height
') 1915 $pDim = $imgInfo[0] . 'x
' . $imgInfo[1] . ' pixels
'; 1916 $clickIcon = '<img src=
"' . htmlspecialchars($imageUrl) . '" hspace=
"5" vspace=
"5" border=
"1" />
'; 1921 // Create file icon: 1922 $size = ' (
' . GeneralUtility::formatSize($fileObject->getSize()) . 'bytes
' . ($pDim ? ',
' . $pDim : '') . ')
'; 1923 $icon = IconUtility::getSpriteIconForResource($fileObject, array('title
' => $fileObject->getName() . $size)); 1924 // Create links for adding the file: 1925 $filesIndex = count($this->elements); 1926 $this->elements['file_
' . $filesIndex] = array( 1928 'table
' => 'sys_file
', 1929 'uid
' => $fileObject->getUid(), 1930 'fileName
' => $fileObject->getName(), 1931 'filePath
' => $fileObject->getUid(), 1932 'fileExt
' => $fileExtension, 1935 if ($this->fileIsSelectableInFileList($fileObject, $imgInfo)) { 1936 $ATag = '<a href=
"#" onclick=
"return BrowseLinks.File.insertElement(\'file_' . $filesIndex . '\');">
'; 1937 $ATag_alt = substr($ATag, 0, -4) . ',1);
">'; 1938 $bulkCheckBox = '<input type="checkbox
" class="typo3-bulk-item
" name="file_
' . $filesIndex . '" value="0
" /> '; 1946 // Create link to showing details about the file in a window: 1947 $Ahref = $GLOBALS['BACK_PATH'] . 'show_item.php?type=file&table=_FILE&uid=' 1948 . rawurlencode($fileObject->getCombinedIdentifier()) 1949 . '&returnUrl=' . rawurlencode(GeneralUtility::getIndpEnv('REQUEST_URI')); 1950 $ATag2 = '<a href="' . htmlspecialchars($Ahref) . '">'; 1952 // Combine the stuff: 1953 $filenameAndIcon = $bulkCheckBox . $ATag_alt . $icon 1954 . htmlspecialchars(GeneralUtility::fixed_lgd_cs($fileObject->getName(), $titleLen)) . $ATag_e; 1959 <tr class="file_list_normal
"> 1960 <td nowrap="nowrap
">' . $filenameAndIcon . ' </td> 1961 <td>' . ($ATag . '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/plusbullet2.gif', 1962 'width="18
" height="16
"') . ' title="' . $GLOBALS['LANG
']->getLL('addToList
', TRUE) 1963 . '" alt="" />' . $ATag_e) . '</td> 1964 <td nowrap="nowrap
">' . ($ATag2 . '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], 1965 'gfx/zoom2.gif', 'width="12
" height="12
"') . ' title="' 1966 . $GLOBALS['LANG
']->getLL('info
', TRUE) . '" alt="" /> ' 1967 . $GLOBALS['LANG']->getLL('info', TRUE) . $ATag2_e) . '</td> 1968 <td nowrap="nowrap
"> ' . $pDim . '</td> 1972 <td class="filelistThumbnail
" colspan="4
">' . $ATag_alt . $clickIcon . $ATag_e . '</td> 1976 <tr class="file_list_normal
"> 1977 <td nowrap="nowrap
">' . $filenameAndIcon . ' </td> 1978 <td>' . ($ATag . '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], 'gfx/plusbullet2.gif', 1979 'width="18
" height="16
"') . ' title="' . $GLOBALS['LANG
']->getLL('addToList
', TRUE) 1980 . '" alt="" />' . $ATag_e) . '</td> 1981 <td nowrap="nowrap
">' . ($ATag2 . '<img' . IconUtility::skinImg($GLOBALS['BACK_PATH'], 1982 'gfx/zoom2.gif', 'width="12
" height="12
"') . ' title="' 1983 . $GLOBALS['LANG
']->getLL('info
', TRUE) . '" alt="" /> ' 1984 . $GLOBALS['LANG']->getLL('info', TRUE) . $ATag2_e) . '</td> 1989 // Wrap all the rows in table tags: 1995 <table cellpadding="0
" cellspacing="0
" id="typo3-filelist
"> 1996 ' . implode('', $lines) . ' 1998 // Return accumulated content for file listing: 2012 protected function fileIsSelectableInFileList(\TYPO3\CMS\Core\Resource\FileInterface $file, array $imgInfo) { 2023 public function folderList(Folder $baseFolder) { 2025 $folders = $baseFolder->getSubfolders(); 2026 $folderIdentifier = $baseFolder->getCombinedIdentifier(); 2027 // Create headline (showing number of folders): 2028 $content .= $this->barheader(sprintf($GLOBALS['LANG']->getLL('folders') . ' (%s):', count($folders))); 2029 $titleLength = (int)$GLOBALS['BE_USER']->uc['titleLen']; 2030 // Create the header of current folder: 2031 $aTag = '<a href="#
" onclick="return insertElement(\
'\',
' . GeneralUtility::quoteJSvalue($folderIdentifier) 2033 .
', \'\', \'\',\'\',1);">';
2035 $folderIcon = $aTag;
2037 'width="18" height="16"') .
' alt="" />';
2039 $folderIcon .=
'</a>';
2040 $content .= $folderIcon .
'<br />';
2044 foreach ($folders as $subFolder) {
2045 $subFolderIdentifier = $subFolder->getCombinedIdentifier();
2047 $icon =
'<img src="clear.gif" width="16" height="16" alt="" /><img' 2049 'width="16" height="16"') .
' title="' . htmlspecialchars($subFolder->getName())
2050 .
'" class="absmiddle" alt="" />';
2052 if ($this->P[
'itemName'] !=
'' && $this->P[
'formName'] !=
'') {
2060 if (strstr($subFolderIdentifier,
',') || strstr($subFolderIdentifier,
'|')) {
2063 $aTag = ($aTag_alt =
'<a href="#" onclick="alert(' . $errorMessage .
');return false;">');
2066 $aTag_alt = substr($aTag, 0, -4) .
',\'\',1);">';
2070 $foldernameAndIcon = $aTag_alt . $icon
2072 if ($this->P[
'itemName'] !=
'') {
2074 <tr class="bgColor4"> 2075 <td nowrap="nowrap">' . $foldernameAndIcon .
' </td> 2080 <tr class="bgColor4"> 2081 <td nowrap="nowrap">' . $foldernameAndIcon .
' </td> 2083 'width="18" height="16"') .
' title="' .
$GLOBALS[
'LANG']->getLL(
'addToList', TRUE)
2084 .
'" alt="" />' . $aTag_e .
' </td> 2090 <td colspan="3"><img src="clear.gif" width="1" height="3" alt="" /></td> 2099 <table border="0" cellpadding="0" cellspacing="1" id="typo3-folderList"> 2100 ' . implode(
'', $lines) .
' 2127 $extensionList = $extensionList ==
'*' ?
'' : $extensionList;
2128 $files = $this->getFilesInFolder($folder, $extensionList);
2130 $out .= $this->
barheader(sprintf(
$GLOBALS[
'LANG']->getLL(
'files') .
' (%s):', count($files)));
2131 $titleLen = (int)
$GLOBALS[
'BE_USER']->uc[
'titleLen'];
2134 $out .= $picon .
'<br />';
2140 <td colspan="2">' . $this->
getMsgBox(
$GLOBALS[
'LANG']->getLL(
'findDragDrop')) .
'</td> 2143 foreach ($files as $fileObject) {
2144 $fileInfo = $fileObject->getStorage()->getFileInfo($fileObject);
2148 $fileExtension = strtolower($fileObject->getExtension());
2151 $fileObject->getProperty(
'width'),
2152 $fileObject->getProperty(
'height')
2154 $pDim = $imgInfo[0] .
'x' . $imgInfo[1] .
' pixels';
2167 $IH = ceil($IH / $IW * $maxW);
2171 $IW = ceil($IW / $IH * $maxH);
2176 <tr class="bgColor4"> 2177 <td nowrap="nowrap">' . $filenameAndIcon .
' </td> 2178 <td nowrap="nowrap">' . ($imgInfo[0] != $IW
2181 'width="18" height="16"') .
' title="' 2182 .
$GLOBALS[
'LANG']->getLL(
'clickToRedrawFullSize', TRUE) .
'" alt="" />' .
'</a>' 2184 . $pDim .
' </td> 2188 <td colspan="2"><img src="' . htmlspecialchars($iUrl) .
'" data-htmlarea-file-uid="' . $fileObject->getUid()
2189 .
'" width="' . htmlspecialchars($IW) .
'" height="' . htmlspecialchars($IH) .
'" border="1" alt="" /></td> 2193 <td colspan="2"><img src="clear.gif" width="1" height="3" alt="" /></td> 2202 File listing / Drag-n-drop 2204 <table border="0" cellpadding="0" cellspacing="1" id="typo3-dragBox"> 2205 ' . implode(
'', $lines) .
' 2225 $folder = rtrim($folder,
'/') .
'/';
2238 return $this->fileProcessor->checkPathAgainstMounts(rtrim($folder,
'/') .
'/') ? TRUE : FALSE;
2250 <!-- Bar header: --> 2251 <h3>' . htmlspecialchars($str) .
'</h3> 2265 .
' alt="" />' . htmlspecialchars($in_msg);
2271 <table cellspacing="0" class="bgColor4" id="typo3-msgBox"> 2273 <td>' . $msg .
'</td> 2289 if (isset($str) && \
TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($str)
2290 && ($this->act ===
'file' || $this->act ===
'folder')
2294 }
catch (\
TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException $e) {
2297 $str = is_object($fileObject) ? $fileObject->getIdentifier() :
'';
2301 <!-- Print current URL --> 2302 <table border="0" cellpadding="0" cellspacing="0" id="typo3-curUrl"> 2304 <td>' .
$GLOBALS[
'LANG']->getLL(
'currentLink', TRUE) .
': ' 2305 . htmlspecialchars(rawurldecode($str)) .
'</td> 2322 $href = trim($href);
2326 $info[
'value'] = $href;
2327 $info[
'act'] =
'url';
2328 $specialParts = explode(
'#_SPECIAL', $href);
2330 if (count($specialParts) == 2) {
2331 $info[
'value'] =
'#_SPECIAL' . $specialParts[1];
2332 $info[
'act'] =
'spec';
2334 $rel = substr($href, strpos($href,
'file:') + 5);
2335 $rel = rawurldecode($rel);
2339 if ($fileOrFolderObject instanceof
Folder) {
2340 $info[
'act'] =
'folder';
2341 $info[
'value'] = $fileOrFolderObject->getCombinedIdentifier();
2342 } elseif ($fileOrFolderObject instanceof
File) {
2343 $info[
'act'] =
'file';
2344 $info[
'value'] = $fileOrFolderObject->getUid();
2346 $info[
'value'] = $rel;
2348 }
catch (\
TYPO3\CMS\Core\Resource\Exception\FileDoesNotExistException $e) {
2350 if (\
TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($rel)) {
2351 $info[
'act'] =
'file';
2353 $info[
'act'] =
'folder';
2355 $info[
'value'] =
'';
2360 if (file_exists(PATH_site . rawurldecode($href))) {
2361 $info[
'value'] = rawurldecode($href);
2362 if (@is_dir((PATH_site . $info[
'value']))) {
2363 $info[
'act'] =
'folder';
2365 $info[
'act'] =
'file';
2369 $uP = parse_url($href);
2371 $pp = preg_split(
'/^id=/', $uP[
'query']);
2372 $pp[1] = preg_replace(
'/&id=[^&]*/',
'', $pp[1]);
2377 if (!\
TYPO3\CMS\Core\Utility\MathUtility::canBeInterpretedAsInteger($id)) {
2379 $id = (int)$idPartR[
'uid'];
2382 $titleLen = (int)
$GLOBALS[
'BE_USER']->uc[
'titleLen'];
2383 $info[
'value'] = (((((
$GLOBALS[
'LANG']->getLL(
'page', TRUE) .
' \'')
2385 .
'\' (ID:
') . $id) . ($uP['fragment
'] ? ', #
' . $uP['fragment
'] : '')) . ')
'; 2386 $info['pageid
'] = $id; 2387 $info['cElement
'] = $uP['fragment
']; 2388 $info['act
'] = 'page
'; 2389 $info['query
'] = $parameters[0] ? '&
' . implode('&
', $parameters) : ''; 2394 if (strtolower(substr($href, 0, 7)) == 'mailto:
') { 2395 $info['value
'] = trim(substr($href, 7)); 2396 $info['act
'] = 'mail
'; 2399 $info['info
'] = $info['value
']; 2401 // NO value inputted: 2403 $info['info
'] = $GLOBALS['LANG
']->getLL('none
'); 2404 $info['value
'] = ''; 2405 $info['act
'] = 'page
'; 2407 // let the hook have a look 2408 foreach ($this->hookObjects as $hookObject) { 2409 $info = $hookObject->parseCurrentUrl($href, $siteUrl, $info); 2423 public function setRecordList($recordList) { 2424 if (!$recordList instanceof \TYPO3\CMS\Backend\RecordList\ElementBrowserRecordList) { 2425 throw new \InvalidArgumentException('$recordList needs to be an instance of \\
TYPO3\\CMS\\Backend\\
RecordList\\ElementBrowserRecordList
', 1370878522); 2427 $this->recordList = $recordList; 2438 public function uploadForm(Folder $folderObject) { 2439 if (!$folderObject->checkActionPermission('write
')) { 2442 // Read configuration of upload field count 2443 $userSetting = $GLOBALS['BE_USER
']->getTSConfigVal('options.folderTree.uploadFieldsInLinkBrowser
'); 2444 $count = isset($userSetting) ? $userSetting : 1; 2445 if ($count === '0
') { 2448 $count = (int)$count === 0 ? 1 : (int)$count; 2449 // Create header, showing upload path: 2450 $header = $folderObject->getIdentifier(); 2454 Form,
for uploading files:
2456 <form action=
"' . $GLOBALS['BACK_PATH'] . 'tce_file.php" method=
"post" name=
"editform"' 2457 . ' id=
"typo3-uplFilesForm" enctype=
"' . htmlspecialchars($GLOBALS['TYPO3_CONF_VARS']['SYS']['form_enctype']) . '">
2458 <table border=
"0" cellpadding=
"0" cellspacing=
"0" id=
"typo3-uplFiles">
2460 <td>
' . $this->barheader($GLOBALS['LANG
']->sL( 2461 'LLL:EXT:lang/locallang_core.xlf:file_upload.php.pagetitle
', TRUE) . ':
') . '</td>
2464 <td
class=
"c-wCell c-hCell"><strong>
' . $GLOBALS['LANG
']->getLL('path
', TRUE) . ':</strong>
' 2465 . htmlspecialchars($header) . '</td>
2468 <td
class=
"c-wCell c-hCell">
'; 2469 // Traverse the number of upload fields (default is 3): 2470 for ($a = 1; $a <= $count; $a++) { 2471 $code .= '<input type=
"file" multiple=
"multiple" name=
"upload_' . $a . '[]"' . $this->doc->formWidth(35) 2473 <input type=
"hidden" name=
"file[upload][' . $a . '][target]" value=
"' 2474 . htmlspecialchars($folderObject->getCombinedIdentifier()) . '" />
2475 <input type=
"hidden" name=
"file[upload][' . $a . '][data]" value=
"' . $a . '" /><br />
'; 2477 // Make footer of upload form, including the submit button: 2478 $redirectValue = $this->getThisScript() . 'act=
' . rawurlencode($this->act) . '&mode=
' . rawurlencode($this->mode) 2479 . '&
expandFolder=
' . rawurlencode($folderObject->getCombinedIdentifier()) 2480 . '&bparams=
' . rawurlencode($this->bparams) 2481 . (is_array($this->P) ? GeneralUtility::implodeArrayForUrl('P
', $this->P) : ''); 2482 $code .= '<input type=
"hidden" name=
"redirect" value=
"' . htmlspecialchars($redirectValue) . '" />
'; 2483 $code .= \TYPO3\CMS\Backend\Form\FormEngine::getHiddenTokenField('tceAction
'); 2485 <div
id=
"c-override">
2486 <label><input type=
"checkbox" name=
"overwriteExistingFiles" id=
"overwriteExistingFiles" value=
"1" />
' 2487 . $GLOBALS['LANG
']->sL('LLL:EXT:lang/locallang_misc.xlf:overwriteExistingFiles
', TRUE) . '</label>
2489 <input type=
"submit" name=
"submit" value=
"' 2490 . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_upload.php.submit', TRUE) . '" />
2507 public function createFolder(Folder $folderObject) { 2508 if (!$folderObject->checkActionPermission('write
')) { 2511 if (!($GLOBALS['BE_USER
']->isAdmin() || $GLOBALS['BE_USER
']->getTSConfigVal('options.createFoldersInEB
'))) { 2514 // Don't show
Folder-create form
if it
's denied 2515 if ($GLOBALS['BE_USER
']->getTSConfigVal('options.folderTree.hideCreateFolder
')) { 2518 // Create header, showing upload path: 2519 $header = $folderObject->getIdentifier(); 2523 Form,
for creating
new folders:
2525 <form action=
"' . $GLOBALS['BACK_PATH'] . 'tce_file.php" method=
"post" name=
"editform2" id=
"typo3-crFolderForm">
2526 <table border=
"0" cellpadding=
"0" cellspacing=
"0" id=
"typo3-crFolder">
2528 <td>
' . $this->barheader($GLOBALS['LANG
']->sL( 2529 'LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.pagetitle
') . ':
') . '</td>
2532 <td
class=
"c-wCell c-hCell"><strong>
' 2533 . $GLOBALS['LANG
']->getLL('path
', TRUE) . ':</strong>
' . htmlspecialchars($header) . '</td>
2536 <td
class=
"c-wCell c-hCell">
'; 2537 // Create the new-folder name field: 2539 $code .= '<input
' . $this->doc->formWidth(20) . ' type=
"text" name=
"file[newfolder][' . $a . '][data]" />
' 2540 . '<input type=
"hidden" name=
"file[newfolder][' . $a . '][target]" value=
"' 2541 . htmlspecialchars($folderObject->getCombinedIdentifier()) . '" />
'; 2542 // Make footer of upload form, including the submit button: 2543 $redirectValue = $this->getThisScript() . 'act=
' . rawurlencode($this->act) . '&mode=
' . rawurlencode($this->mode) 2544 . '&
expandFolder=
' . rawurlencode($folderObject->getCombinedIdentifier()) 2545 . '&bparams=
' . rawurlencode($this->bparams) 2546 . (is_array($this->P) ? GeneralUtility::implodeArrayForUrl('P
', $this->P) : ''); 2547 $code .= '<input type=
"hidden" name=
"redirect" value=
"' . htmlspecialchars($redirectValue) . '" />
' 2548 . \TYPO3\CMS\Backend\Form\FormEngine::getHiddenTokenField('tceAction
') 2549 . '<input type=
"submit" name=
"submit" value=
"' 2550 . $GLOBALS['LANG']->sL('LLL:EXT:lang/locallang_core.xlf:file_newfolder.php.submit', TRUE) . '" />
'; 2565 public function getBulkSelector($filesCount) { 2570 $labelToggleSelection = $GLOBALS['LANG
']->sL('LLL:EXT:lang/locallang_browse_links.xlf:toggleSelection
', TRUE); 2571 $labelImportSelection = $GLOBALS['LANG
']->sL('LLL:EXT:lang/locallang_browse_links.xlf:importSelection
', TRUE); 2572 // Getting flag for showing/not showing thumbnails: 2573 $noThumbsInEB = $GLOBALS['BE_USER
']->getTSConfigVal('options.noThumbsInEB
'); 2574 $out = $this->doc->spacer(10) . '<div>
' . '<a href=
"#" onclick=
"BrowseLinks.Selector.handle()">
' 2575 . '<img
' . IconUtility::skinImg($GLOBALS['BACK_PATH
'], 'gfx/
import.gif
', 'width=
"12" height=
"12"') 2576 . ' title=
"' . $labelImportSelection . '" alt=
"" />
' . $labelImportSelection . '</a>
' 2577 . '<a href=
"#" onclick=
"BrowseLinks.Selector.toggle()">
' . '<img
' 2578 . IconUtility::skinImg($GLOBALS['BACK_PATH
'], 'gfx/clip_select.gif
', 'width=
"12" height=
"12"') 2579 . ' title=
"' . $labelToggleSelection . '" alt=
"" />
' . $labelToggleSelection . '</a>
' . '</div>
'; 2580 $thumbNailCheck = ''; 2581 if (!$noThumbsInEB && $this->selectedFolder) { 2582 // MENU-ITEMS, fetching the setting for thumbnails from File>List module: 2583 $_MOD_MENU = array('displayThumbs
' => ''); 2584 $_MCONF['name
'] = 'file_list
'; 2585 $_MOD_SETTINGS = BackendUtility::getModuleData($_MOD_MENU, GeneralUtility::_GP('SET
'), $_MCONF['name
']); 2586 $addParams = '&act=
' . $this->act . '&mode=
' . $this->mode 2587 . '&
expandFolder=
' . rawurlencode($this->selectedFolder->getCombinedIdentifier()) 2588 . '&bparams=
' . rawurlencode($this->bparams); 2589 $thumbNailCheck = BackendUtility::getFuncCheck('', 'SET[displayThumbs]
', $_MOD_SETTINGS['displayThumbs
'], 2590 GeneralUtility::_GP('M
') ? '' : $this->thisScript, $addParams, 'id=
"checkDisplayThumbs"') 2591 . ' <label
for=
"checkDisplayThumbs">
' 2592 . $GLOBALS['LANG
']->sL('LLL:EXT:lang/locallang_mod_file_list.xlf:displayThumbs
', TRUE) . '</label>
'; 2593 $out .= $this->doc->spacer(5) . $thumbNailCheck . $this->doc->spacer(15); 2595 $out .= $this->doc->spacer(15); 2607 protected function areFieldChangeFunctionsValid($handleFlexformSections = FALSE) { 2609 if (isset($this->P['fieldChangeFunc
']) && is_array($this->P['fieldChangeFunc
']) && isset($this->P['fieldChangeFuncHash
'])) { 2611 $pattern = '#\\[el\\]\\[(([^]-]+-[^]-]+-)(idx\\d+-)([^]]+))\\]#i
'; 2612 $fieldChangeFunctions = $this->P['fieldChangeFunc
']; 2613 // Special handling of flexform sections: 2614 // Field change functions are modified in JavaScript, thus the hash is always invalid 2615 if ($handleFlexformSections && preg_match($pattern, $this->P['itemName
'], $matches)) { 2616 $originalName = $matches[1]; 2617 $cleanedName = $matches[2] . $matches[4]; 2618 foreach ($fieldChangeFunctions as &$value) { 2619 $value = str_replace($originalName, $cleanedName, $value); 2623 $result = $this->P['fieldChangeFuncHash
'] === GeneralUtility::hmac(serialize($fieldChangeFunctions)); 2633 protected function getTemporaryTreeMountCancelNotice() { 2634 if ((int)$GLOBALS['BE_USER
']->getSessionData('pageTree_temporaryMountPoint
') === 0) { 2637 $link = '<a href=
"' . htmlspecialchars(GeneralUtility::linkThisScript(array('setTempDBmount' => 0))) . '">
' 2638 . $GLOBALS['LANG
']->sl('LLL:EXT:lang/locallang_core.xlf:labels.temporaryDBmount
', TRUE) . '</a>
'; 2640 $flashMessage = GeneralUtility::makeInstance( 2641 'TYPO3\\CMS\\Core\\Messaging\\FlashMessage
', 2644 \TYPO3\CMS\Core\Messaging\FlashMessage::INFO 2646 return $flashMessage->render(); 2656 protected function getFilesInFolder(\TYPO3\CMS\Core\Resource\Folder $folder, $extensionList) { 2657 if ($extensionList !== '') { 2659 $filter = GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\Resource\\Filter\\FileExtensionFilter
'); 2660 $filter->setAllowedFileExtensions($extensionList); 2661 $folder->setFileAndFolderNameFilters(array(array($filter, 'filterFileList
'))); 2663 return $folder->getFiles();
static skinImg($backPath, $src, $wHattribs='', $outputMode=0)
TBE_expandSubFolders(Folder $folder)
static getRecordWSOL($table, $uid, $fields=' *', $where='', $useDeleteClause=TRUE, $unsetMovePointers=FALSE)
parseCurUrl($href, $siteUrl)
static getRecordsByField($theTable, $theField, $theValue, $whereClause='', $groupBy='', $orderBy='', $limit='', $useDeleteClause=TRUE)
static isFirstPartOfStr($str, $partStr)
static getSpriteIconForResource(\TYPO3\CMS\Core\Resource\ResourceInterface $resource, array $options=array(), array $overlays=array())
initHookObjects($hookKey)
static quoteJSvalue($value)
TBE_dragNDrop(Folder $folder, $extensionList='')
static getIndpEnv($getEnvName)
static getUserObj($classRef, $checkPrefix='', $silent=FALSE)
static hmac($input, $additionalSecret='')
static logDeprecatedFunction()
static makeInstance($className)
static trimExplode($delim, $string, $removeEmptyValues=FALSE, $limit=0)
static getRecordTitle($table, $row, $prep=FALSE, $forceResult=TRUE)
static getSpriteIconForRecord($table, array $row, array $options=array())
static unQuoteFilenames($parameters, $unQuote=FALSE)
static getModuleUrl($moduleName, $urlParameters=array(), $backPathOverride=FALSE, $returnAbsoluteUrl=FALSE)
TBE_expandFolder(Folder $folder, $extensionList='', $noThumbs=FALSE)
static get_tag_attributes($tag)
static linkThisScript(array $getParams=array())
static getModuleData($MOD_MENU, $CHANGED_SETTINGS, $modName, $type='', $dontValidateList='', $setDefaultList='')
static versioningPlaceholderClause($table)
processSessionData($data)
static rawUrlEncodeFP($str)
static RTEsetup($RTEprop, $table, $field, $type='')
static implodeArrayForUrl($name, array $theArray, $str='', $skipBlank=FALSE, $rawurlencodeParamName=FALSE)
static formatSize($sizeInBytes, $labels='')
static fixed_lgd_cs($string, $chars, $appendString='...')
if(!defined('TYPO3_MODE')) $GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['logoff_pre_processing'][]
static inList($list, $item)
getMsgBox($in_msg, $icon='icon_note')
static stripPathSitePrefix($path)
static getPagesTSconfig($id, $rootLine=NULL, $returnPartArray=FALSE)
uploadForm(Folder $folderObject)
expandFolder(Folder $folder, $extensionList='')
areFieldChangeFunctionsValid($handleFlexformSections=FALSE)
static deleteClause($table, $tableAlias='')
createFolder(Folder $folderObject)