issues with rootline HMENUs on a translated page
authorMartin Kutschker <martin.t.kutschker@blackbox.net>
Wed, 27 Feb 2008 19:53:57 +0000 (19:53 +0000)
committerMartin Kutschker <martin.t.kutschker@blackbox.net>
Wed, 27 Feb 2008 19:53:57 +0000 (19:53 +0000)
git-svn-id: https://svn.typo3.org/TYPO3v4/Core/trunk@3309 709f56b5-9817-0410-a4d7-c38de5d9e867

ChangeLog
t3lib/class.t3lib_page.php

index 93e5197..c95e683 100755 (executable)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+
+2008-02-27  Martin Kutschker  <martin.t.kutschker@blackbox.net>
+
+       * Fix feature #6601: issues with rootline HMENUs on a translated page
+
 2008-02-27  Jeff Segars  <jeff@webempoweredchurch.org>
 
        * Added feature #7607: Add post processing hooks for Frontend Editing
 2008-02-27  Jeff Segars  <jeff@webempoweredchurch.org>
 
        * Added feature #7607: Add post processing hooks for Frontend Editing
index e351dd5..f7cd339 100755 (executable)
@@ -186,20 +186,23 @@ class t3lib_pageSelect {
         * @see getPage_noCheck()
         */
        function getPage($uid, $disableGroupAccessCheck=FALSE)  {
         * @see getPage_noCheck()
         */
        function getPage($uid, $disableGroupAccessCheck=FALSE)  {
-               if (is_array($this->cache_getPage[$uid][$disableGroupAccessCheck?1:0])) {
-                       return $this->cache_getPage[$uid][$disableGroupAccessCheck?1:0];
+               $accessCheck = $disableGroupAccessCheck ? '' : $this->where_groupAccess;
+               $cacheKey = md5($accessCheck . '-' . $this->where_hid_del . '-' . $this->sys_language_uid);
+
+               if (is_array($this->cache_getPage[$uid][$cacheKey]))    {
+                       return $this->cache_getPage[$uid][$cacheKey];
                }
                $result = array();
                }
                $result = array();
-               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'uid='.intval($uid).$this->where_hid_del.($disableGroupAccessCheck ? '' : $this->where_groupAccess));
+               $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('*', 'pages', 'uid='.intval($uid).$this->where_hid_del.$accessCheck);
                $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                $GLOBALS['TYPO3_DB']->sql_free_result($res);
                if ($row)       {
                        $this->versionOL('pages',$row);
                        if (is_array($row))     {
                $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res);
                $GLOBALS['TYPO3_DB']->sql_free_result($res);
                if ($row)       {
                        $this->versionOL('pages',$row);
                        if (is_array($row))     {
-                               $result = $this->getPageOverlay($row);
-                               $this->cache_getPage[$uid][$disableGroupAccessCheck?1:0] = $result;
+                               $result = $this->getPageOverlay($row);  
                        }
                }
                        }
                }
+               $this->cache_getPage[$uid][$cacheKey] = $result;
                return $result;
        }
 
                return $result;
        }