Project

General

Profile

Feature #19191 ยป browse_links_rte6.diff

Administrator Admin, 2008-08-16 18:06

View differences:

typo3/browse_links.php (working copy)
* @return void
*/
function main() {
global $BE_USER, $BACK_PATH;
$this->content = '';
// look for alternativ mountpoints
switch((string)$this->mode) {
case 'rte':
case 'db':
case 'wizard':
// Setting alternative browsing mounts (ONLY local to browse_links.php this script so they stay "read-only")
$altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.altElementBrowserMountPoints'));
if ($altMountPoints) {
$GLOBALS['BE_USER']->groupData['webmounts'] = implode(',', array_unique(t3lib_div::intExplode(',', $altMountPoints)));
$GLOBALS['WEBMOUNTS'] = $GLOBALS['BE_USER']->returnWebmounts();
$browser_readOnly = true;
}
break;
case 'file':
case 'filedrag':
case 'folder':
// Setting alternative browsing mounts (ONLY local to browse_links.php this script so they stay "read-only")
$altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.folderTree.altElementBrowserMountPoints'));
if ($altMountPoints) {
$altMountPoints = t3lib_div::trimExplode(',', $altMountPoints);
foreach($altMountPoints as $filePathRelativeToFileadmindir) {
$GLOBALS['BE_USER']->addFileMount('', $filePathRelativeToFileadmindir, $filePathRelativeToFileadmindir, 1, 0);
}
$GLOBALS['FILEMOUNTS'] = $GLOBALS['BE_USER']->returnFilemounts();
$browser_readOnly = true;
}
break;
}
// render type by user func
$browserRendered = false;
if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'])) {
......
$this->browser = t3lib_div::makeInstance('browse_links');
$this->browser->init();
$modData = $BE_USER->getModuleData('browse_links.php','ses');
if ($browser_readOnly) {
$this->browser->readOnly = true;
}
$modData = $GLOBALS['BE_USER']->getModuleData('browse_links.php', 'ses');
list($modData, $store) = $this->browser->processSessionData($modData);
$BE_USER->pushModuleData('browse_links.php',$modData);
$GLOBALS['BE_USER']->pushModuleData('browse_links.php', $modData);
// Output the correct content according to $this->mode
switch((string)$this->mode) {
case 'rte':
case 'db':
case 'wizard':
// Setting alternative browsing mounts (ONLY local to browse_links.php this script so they stay "read-only")
$altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.altElementBrowserMountPoints'));
if ($altMountPoints) {
$BE_USER->groupData['webmounts'] = implode(',',array_unique(t3lib_div::intExplode(',',$altMountPoints)));
$GLOBALS['WEBMOUNTS'] = $BE_USER->returnWebmounts();
$this->browser->readOnly = TRUE;
}
break;
case 'file':
case 'filedrag':
case 'folder':
// Setting alternative browsing mounts (ONLY local to browse_links.php this script so they stay "read-only")
$altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.folderTree.altElementBrowserMountPoints'));
if ($altMountPoints) {
$altMountPoints = t3lib_div::trimExplode(',',$altMountPoints);
foreach($altMountPoints as $filePathRelativeToFileadmindir) {
$BE_USER->addFileMount('', $filePathRelativeToFileadmindir, $filePathRelativeToFileadmindir, 1,0);
}
$GLOBALS['FILEMOUNTS'] = $BE_USER->returnFilemounts();
$this->browser->readOnly = TRUE;
}
break;
}
// Output the correct content according to $this->mode
......
$SOBE->init();
$SOBE->main();
$SOBE->printContent();
?>
?>
typo3/sysext/rtehtmlarea/mod3/browse_links.php (working copy)
$this->content = '';
//altMountPoints
$altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.altElementBrowserMountPoints'));
if ($altMountPoints) {
$GLOBALS['BE_USER']->groupData['webmounts'] = implode(',', array_unique(t3lib_div::intExplode(',', $altMountPoints)));
$GLOBALS['WEBMOUNTS'] = $GLOBALS['BE_USER']->returnWebmounts();
$browser_readOnly = true;
}
// Setting alternative browsing mounts (ONLY local to browse_links.php this script so they stay "read-only")
$altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.folderTree.altElementBrowserMountPoints'));
if ($altMountPoints) {
$altMountPoints = t3lib_div::trimExplode(',', $altMountPoints);
foreach($altMountPoints as $filePathRelativeToFileadmindir) {
$GLOBALS['BE_USER']->addFileMount('', $filePathRelativeToFileadmindir, $filePathRelativeToFileadmindir, 1, 0);
}
$GLOBALS['FILEMOUNTS'] = $GLOBALS['BE_USER']->returnFilemounts();
$browser_readOnly = true;
}
// render type by user func
$browserRendered = false;
if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'])) {
......
$SOBE->browser = t3lib_div::makeInstance('tx_rtehtmlarea_browse_links');
$SOBE->browser->init();
if ($browser_readOnly) {
$SOBE->browser->readOnly = true;
}
$modData = $BE_USER->getModuleData('browse_links.php','ses');
list($modData, $store) = $SOBE->browser->processSessionData($modData);
$BE_USER->pushModuleData('browse_links.php',$modData);
// Output the correct content according to $this->mode
switch((string)$this->mode) {
case 'rte':
......
$SOBE = t3lib_div::makeInstance('tx_rtehtmlarea_SC_browse_links');
$SOBE->main();
$SOBE->printContent();
?>
?>
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php (working copy)
var $editorNo;
var $buttonConfig = array();
public $anchorTypes = array( 'page', 'url', 'file', 'mail', 'spec');
protected $classesAnchorDefault = array();
protected $classesAnchorDefaultTitle = array();
protected $classesAnchorDefaultTarget = array();
protected $classesAnchorJSOptions = array();
public $allowedItems;
public $allowedItems;
/**
* Constructor:
......
break;
case 'file':
$content.=$this->addAttributesForm();
$foldertree = t3lib_div::makeInstance('tx_rtehtmlarea_folderTree');
$tree=$foldertree->getBrowsableTree();
......
if (!$path || !@is_dir($path)) {
$path = $fileProcessor->findTempFolder().'/'; // The closest TEMP-path is found
}
if ($path!='/' && @is_dir($path)) {
if ($path!='/' && @is_dir($path) && !$this->readOnly && count($GLOBALS['FILEMOUNTS'])) {
$uploadForm=$this->uploadForm($path);
$createFolder=$this->createFolder($path);
} else {
......
}
}
$content.= '
<!--
Wrapper table for folder tree / file list:
......
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php']);
}
?>
?>
typo3/sysext/rtehtmlarea/mod4/select_image.php (working copy)
$this->content = '';
// Setting alternative browsing mounts (ONLY local to browse_links.php this script so they stay "read-only")
$altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.folderTree.altElementBrowserMountPoints'));
if ($altMountPoints) {
$altMountPoints = t3lib_div::trimExplode(',', $altMountPoints);
foreach($altMountPoints as $filePathRelativeToFileadmindir) {
$GLOBALS['BE_USER']->addFileMount('', $filePathRelativeToFileadmindir, $filePathRelativeToFileadmindir, 1, 0);
}
$GLOBALS['FILEMOUNTS'] = $GLOBALS['BE_USER']->returnFilemounts();
$browser_readOnly = true;
}
// render type by user func
$browserRendered = false;
if (is_array ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['typo3/browse_links.php']['browserRendering'])) {
......
$SOBE->browser = t3lib_div::makeInstance('tx_rtehtmlarea_select_image');
$SOBE->browser->init();
if ($browser_readOnly) {
$SOBE->browser->readOnly = true;
}
$modData = $BE_USER->getModuleData('select_image.php','ses');
list($modData, $store) = $SOBE->browser->processSessionData($modData);
$BE_USER->pushModuleData('select_image.php',$modData);
    (1-1/1)