00001 <?php
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052 $BACK_PATH='';
00053 require ('init.php');
00054 require ('template.php');
00055 $LANG->includeLLFile('EXT:lang/locallang_browse_links.xml');
00056
00057 require_once (PATH_typo3.'/class.browse_links.php');
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078 class SC_browse_links {
00079
00080
00081
00082
00083
00084
00085
00086
00087
00088
00089
00090
00091 var $mode;
00092
00093
00094
00095
00096
00097
00098
00099
00100 var $browser;
00101
00102
00103
00104
00105
00106
00107 var $doc;
00108
00109
00110
00111
00112
00113
00114 function init () {
00115
00116
00117 $this->mode = t3lib_div::_GP('mode');
00118 if (!$this->mode) {
00119 $this->mode = 'rte';
00120 }
00121
00122
00123
00124 $this->doc = t3lib_div::makeInstance('template');
00125 $this->doc->backPath = $GLOBALS['BACK_PATH'];
00126 }
00127
00128
00129
00130
00131
00132
00133
00134 function main() {
00135
00136 $this->content = '';
00137
00138
00139 switch((string)$this->mode) {
00140 case 'rte':
00141 case 'db':
00142 case 'wizard':
00143
00144 $altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.altElementBrowserMountPoints'));
00145 if ($altMountPoints) {
00146 $GLOBALS['BE_USER']->groupData['webmounts'] = implode(',', array_unique(t3lib_div::intExplode(',', $altMountPoints)));
00147 $GLOBALS['WEBMOUNTS'] = $GLOBALS['BE_USER']->returnWebmounts();
00148 }
00149 case 'file':
00150 case 'filedrag':
00151 case 'folder':
00152
00153 $altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.folderTree.altElementBrowserMountPoints'));
00154 if ($altMountPoints) {
00155 $altMountPoints = t3lib_div::trimExplode(',', $altMountPoints);
00156 foreach($altMountPoints as $filePathRelativeToFileadmindir) {
00157 $GLOBALS['BE_USER']->addFileMount('', $filePathRelativeToFileadmindir, $filePathRelativeToFileadmindir, 1, 'readonly');
00158 }
00159 $GLOBALS['FILEMOUNTS'] = $GLOBALS['BE_USER']->returnFilemounts();
00160 }
00161 break;
00162 }
00163
00164
00165
00166 $browserRendered = false;
00167 if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'])) {
00168 foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'] as $classRef) {
00169 $browserRenderObj = t3lib_div::getUserObj($classRef);
00170 if (is_object($browserRenderObj) && method_exists($browserRenderObj, 'isValid') && method_exists($browserRenderObj, 'render')) {
00171 if ($browserRenderObj->isValid($this->mode, $this)) {
00172 $this->content.= $browserRenderObj->render($this->mode, $this);
00173 $browserRendered = true;
00174 break;
00175 }
00176 }
00177 }
00178 }
00179
00180
00181 if(!$browserRendered) {
00182 $this->browser = t3lib_div::makeInstance('browse_links');
00183 $this->browser->init();
00184 $modData = $GLOBALS['BE_USER']->getModuleData('browse_links.php', 'ses');
00185 list($modData, $store) = $this->browser->processSessionData($modData);
00186 $GLOBALS['BE_USER']->pushModuleData('browse_links.php', $modData);
00187
00188
00189 switch((string)$this->mode) {
00190 case 'rte':
00191 $this->content = $this->browser->main_rte();
00192 break;
00193 case 'db':
00194 $this->content = $this->browser->main_db();
00195 break;
00196 case 'file':
00197 case 'filedrag':
00198 $this->content = $this->browser->main_file();
00199 break;
00200 case 'folder':
00201 $this->content = $this->browser->main_folder();
00202 break;
00203 case 'wizard':
00204 $this->content = $this->browser->main_rte(1);
00205 break;
00206 }
00207 }
00208 }
00209
00210
00211
00212
00213
00214
00215 function printContent() {
00216 echo $this->content;
00217 }
00218
00219
00220 }
00221
00222
00223
00224 if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/browse_links.php']) {
00225 include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['typo3/browse_links.php']);
00226 }
00227
00228
00229
00230
00231 $SOBE = t3lib_div::makeInstance('SC_browse_links');
00232 $SOBE->init();
00233 $SOBE->main();
00234 $SOBE->printContent();
00235
00236 ?>