Follow-up to #13739: Make the clickmenu work again and also for the case when "Substi...
authorErnesto Baschny <ernst@cron-it.de>
Thu, 25 Mar 2010 15:39:57 +0000 (15:39 +0000)
committerErnesto Baschny <ernst@cron-it.de>
Thu, 25 Mar 2010 15:39:57 +0000 (15:39 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/branches/TYPO3_4-2@7165 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_befunc.php

index 1b12eb7..4800bf8 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,6 +1,7 @@
 2010-03-25  Ernesto Baschny  <ernst@cron-it.de>
 
        * Fixed bug #13901: GIFBULDER generates same picture twice (in typo3temp/GB) (thanks to Vladimir Podkovanov)
+       * Follow-up to #13739: Make the clickmenu work again and also for the case when "Substitute Mount Point" is not set
 
 2010-03-18  Ernesto Baschny  <ernst@cron-it.de>
 
index 66b1298..00686b4 100755 (executable)
@@ -2545,17 +2545,19 @@ final class t3lib_BEfunc {
                                }
                        }
                        $preUrl = $preUrl_temp ? (t3lib_div::getIndpEnv('TYPO3_SSL') ? 'https://' : 'http://').$preUrl_temp : $backPath.'..';
+
+                               // check if we need to preview a mount point
+                       t3lib_div::requireOnce(PATH_t3lib . 'class.t3lib_page.php');
+                       $sys_page = t3lib_div::makeInstance('t3lib_pageSelect');
+                       $sys_page->init(FALSE);
+                       $mountPointInfo = $sys_page->getMountPointInfo($id);
+                       if ($mountPointInfo && $mountPointInfo['overlay']) {
+                               $id = $mountPointInfo['mount_pid'];
+                               $addGetVars .= '&MP=' . $mountPointInfo['MPvar'];
+                       }
+
                        $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();' : '');