Project

General

Profile

Bug #19886 » stoptree-10224-v2.patch

Administrator Admin, 2009-01-26 12:47

View differences:

typo3/sysext/rtehtmlarea/mod3/browse_links.php (working copy)
function main() {
// Setting alternative web browsing mounts (ONLY local to browse_links.php this script so they stay "read-only")
$altMountPoints = trim($GLOBALS['BE_USER']->getTSConfigVal('options.pageTree.altElementBrowserMountPoints'));
// Clear temporary DB mounts
$tmpMount = t3lib_div::_GET('setTempDBmount');
if (isset($tmpMount)) {
$GLOBALS['BE_USER']->setAndSaveSessionData('pageTree_temporaryMountPoint',intval($tmpMount));
}
// Set temporary DB mounts
$tempDBmount = intval($GLOBALS['BE_USER']->getSessionData('pageTree_temporaryMountPoint'));
if ($tempDBmount) {
$altMountPoints = $tempDBmount;
}
if ($altMountPoints) {
$GLOBALS['BE_USER']->groupData['webmounts'] = implode(',', array_unique(t3lib_div::intExplode(',', $altMountPoints)));
$GLOBALS['WEBMOUNTS'] = $GLOBALS['BE_USER']->returnWebmounts();
......
$SOBE->main();
$SOBE->printContent();
?>
?>
typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php (working copy)
class tx_rtehtmlarea_pageTree extends rtePageTree {
/**
* Adds a red "+" to the input string, $str, if the field "php_tree_stop" in the $row (pages) is set
*
* @param string Input string, like a page title for the tree
* @param array record row with "php_tree_stop" field
* @return string Modified string
* @access private
*/
function wrapStop($str,$row) {
if ($row['php_tree_stop']) {
$str.='<span class="typo3-red"><a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('setTempDBmount' => $row['uid']))).'" class="typo3-red">+</a> </span>';
}
return $str;
}
/**
* Create the page navigation tree in HTML
*
* @param array Tree array
......
$pagetree->addField('nav_title');
$tree=$pagetree->getBrowsableTree();
$cElements = $this->expandPage();
// Outputting Temporary DB mount notice:
if (intval($GLOBALS['BE_USER']->getSessionData('pageTree_temporaryMountPoint'))) {
$dbmount= '
<div class="bgColor4 c-notice">
<img'.t3lib_iconWorks::skinImg('','gfx/icon_note.gif','width="18" height="16"').' align="top" alt="" />'.
'<a href="'.htmlspecialchars(t3lib_div::linkThisScript(array('setTempDBmount' => 0))).'">'.
$LANG->sl('LLL:EXT:lang/locallang_core.xml:labels.temporaryDBmount',1).
'</a> </div>
';
}
$content.= '
<!--
Wrapper table for page tree / record list:
-->
<table border="0" cellpadding="0" cellspacing="0" id="typo3-linkPages">
<tr>
<td class="c-wCell" valign="top">'.$this->barheader($LANG->getLL('pageTree').':').$tree.'</td>
<td class="c-wCell" valign="top">'.$this->barheader($LANG->getLL('pageTree').':').$dbmount.$tree.'</td>
<td class="c-wCell" valign="top">'.$cElements.'</td>
</tr>
</table>
......
include_once($TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['ext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php']);
}
?>
?>
(2-2/6)