Fixed bug #13739: "Show" clickmenu in page tree does not work for mount pages
authorErnesto Baschny <ernst@cron-it.de>
Thu, 18 Mar 2010 07:22:24 +0000 (07:22 +0000)
committerErnesto Baschny <ernst@cron-it.de>
Thu, 18 Mar 2010 07:22:24 +0000 (07:22 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@7127 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_befunc.php

index 742d9cc..edc8455 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-18  Ernesto Baschny  <ernst@cron-it.de>
+
+       * Fixed bug #13739: "Show" clickmenu in page tree does not work for mount pages
+
 2010-03-15  Tobias Liebig  <mail_typo3@etobi.de>
 
        * Follow-up to #1104: fix 'required' validation for IRRE records
index 5a7eb34..880bc15 100755 (executable)
@@ -2547,6 +2547,15 @@ final class t3lib_BEfunc {
                        $preUrl = $preUrl_temp ? (t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://').$preUrl_temp : $backPath.'..';
                        $url = $preUrl.$viewScript.$id.$addGetVars.$anchor;
                }
+       
+                       // check if we need to preview a mount point
+               $sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
+               $sys_page->init(false);
+               $mountPointInfo = $sys_page->getMountPointInfo($id);
+               if ($mountPointInfo) {
+                       $id = $mountPointInfo['mount_pid'];
+                       $addGetVars .= '&MP=' . $mountPointInfo['MPvar'];
+               }
 
                return "previewWin=window.open('".$url."','newTYPO3frontendWindow');".
                                ($switchFocus ? 'previewWin.focus();' : '');