From: Susanne Moog Date: Fri, 30 Apr 2010 20:43:37 +0000 (+0000) Subject: Fixed bug Bug #10224: Not possible to set links to pages underneath a page with activ... X-Git-Tag: TYPO3_4-4-0beta2~42 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/7d34a9dc40a4bdb387b2b13594d939dd961a04ab Fixed bug Bug #10224: Not possible to set links to pages underneath a page with activated "temporary DB mount" (thanks to Georg Ringer) git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@7483 709f56b5-9817-0410-a4d7-c38de5d9e867 --- diff --git a/ChangeLog b/ChangeLog index d5a87d59b8d..fae61f36264 100755 --- a/ChangeLog +++ b/ChangeLog @@ -38,6 +38,7 @@ * Fixed bug #11811: Raise versions and states of sysexts (stable <-> 1.0.0) (thanks to Steffen Gebert) * Fixed bug #14179: TCA select doesn't show record titles whic start with <= (thanks to Georg Ringer) * Added feature #14247: Add a concatenator for CSS and JS (thanks to Steffen Gebert) + * Fixed bug Bug #10224: Not possible to set links to pages underneath a page with activated "temporary DB mount" (thanks to Georg Ringer) 2010-04-30 Steffen Kamper diff --git a/t3lib/class.t3lib_browsetree.php b/t3lib/class.t3lib_browsetree.php index 62b74ea33fa..e57e210deb9 100644 --- a/t3lib/class.t3lib_browsetree.php +++ b/t3lib/class.t3lib_browsetree.php @@ -31,7 +31,7 @@ * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj * * @author Kasper Skaarhoj - * @coauthor René Fritz + * @coauthor René Fritz */ /** * [CLASS/FUNCTION INDEX of SCRIPT] @@ -65,7 +65,7 @@ * Extension class for the t3lib_treeView class, specially made for browsing pages * * @author Kasper Skaarhoj - * @coauthor René Fritz + * @coauthor Ren� Fritz * @see t3lib_treeView, t3lib_pageTree * @package TYPO3 * @subpackage t3lib @@ -167,6 +167,23 @@ class t3lib_browseTree extends t3lib_treeView { } return $title; } + + /** + * 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 .= ' + + + '; + } + return $str; + } } if (defined('TYPO3_MODE') && $TYPO3_CONF_VARS[TYPO3_MODE]['XCLASS']['t3lib/class.t3lib_browsetree.php']) { diff --git a/t3lib/class.t3lib_treeview.php b/t3lib/class.t3lib_treeview.php index 8b6090a93a1..e384234c929 100644 --- a/t3lib/class.t3lib_treeview.php +++ b/t3lib/class.t3lib_treeview.php @@ -31,7 +31,7 @@ * Revised for TYPO3 3.6 November/2003 by Kasper Skaarhoj * * @author Kasper Skaarhoj - * @coauthor René Fritz + * @coauthor René Fritz */ /** * [CLASS/FUNCTION INDEX of SCRIPT] @@ -104,7 +104,7 @@ * Base class for creating a browsable array/page/folder tree in HTML * * @author Kasper Skaarhoj - * @coauthor René Fritz + * @coauthor René Fritz * @package TYPO3 * @subpackage t3lib * @see t3lib_browsetree, t3lib_pagetree, t3lib_foldertree @@ -547,7 +547,7 @@ class t3lib_treeView { */ function wrapStop($str,$row) { if ($row['php_tree_stop']) { - $str.='+ '; + $str .= '+ '; } return $str; } diff --git a/typo3/browse_links.php b/typo3/browse_links.php index 6c13a55866a..4a3bb18bb34 100644 --- a/typo3/browse_links.php +++ b/typo3/browse_links.php @@ -133,6 +133,23 @@ class SC_browse_links { */ function main() { + // 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(); + } + $this->content = ''; // look for alternativ mountpoints diff --git a/typo3/class.browse_links.php b/typo3/class.browse_links.php index de9e1606d0b..cfa95a60ece 100644 --- a/typo3/class.browse_links.php +++ b/typo3/class.browse_links.php @@ -1413,6 +1413,21 @@ class browse_links { $pagetree->thisScript = $this->thisScript; $tree=$pagetree->getBrowsableTree(); $cElements = $this->expandPage(); + + // Outputting Temporary DB mount notice: + if (intval($GLOBALS['BE_USER']->getSessionData('pageTree_temporaryMountPoint'))) { + $link = '' . + $LANG->sl('LLL:EXT:lang/locallang_core.xml:labels.temporaryDBmount', 1) . + ''; + $flashMessage = t3lib_div::makeInstance( + 't3lib_FlashMessage', + $link, + '', + t3lib_FlashMessage::INFO + ); + $dbmount = $flashMessage->render(); + } + $content.= ' - +
'.$this->barheader($GLOBALS['LANG']->getLL('pageTree').':').$tree.'' . $this->barheader($GLOBALS['LANG']->getLL('pageTree') . ':') . $dbmount . $tree . ' '.$cElements.'
diff --git a/typo3/sysext/rtehtmlarea/mod3/browse_links.php b/typo3/sysext/rtehtmlarea/mod3/browse_links.php index 021c033915e..3f24733f397 100644 --- a/typo3/sysext/rtehtmlarea/mod3/browse_links.php +++ b/typo3/sysext/rtehtmlarea/mod3/browse_links.php @@ -67,6 +67,19 @@ class tx_rtehtmlarea_SC_browse_links { 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(); diff --git a/typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php b/typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php index 97e74067f77..0c1e7c84fd9 100644 --- a/typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php +++ b/typo3/sysext/rtehtmlarea/mod3/class.tx_rtehtmlarea_browse_links.php @@ -816,14 +816,30 @@ class tx_rtehtmlarea_browse_links extends browse_links { $pagetree->addField('nav_title'); $tree=$pagetree->getBrowsableTree(); $cElements = $this->expandPage(); - $content.= ' + + + // Outputting Temporary DB mount notice: + if (intval($GLOBALS['BE_USER']->getSessionData('pageTree_temporaryMountPoint'))) { + $link = '' . + $LANG->sl('LLL:EXT:lang/locallang_core.xml:labels.temporaryDBmount', 1) . + ''; + $flashMessage = t3lib_div::makeInstance( + 't3lib_FlashMessage', + $link, + '', + t3lib_FlashMessage::INFO + ); + $dbmount = $flashMessage->render(); + } + + $content .= ' - - + +
'.$this->barheader($LANG->getLL('pageTree').':').$tree.''.$cElements.'' . $this->barheader($LANG->getLL('pageTree') . ':') . $dbmount . $tree . '' . $cElements . '
';