Index: t3lib/interfaces/interface.t3lib_pageselect_getpagehook.php =================================================================== --- t3lib/interfaces/interface.t3lib_pageselect_getpagehook.php (Revision 0) +++ t3lib/interfaces/interface.t3lib_pageselect_getpagehook.php (Revision 0) @@ -0,0 +1,51 @@ + +* All rights reserved +* +* This script is part of the TYPO3 project. The TYPO3 project is +* free software; you can redistribute it and/or modify +* it under the terms of the GNU General Public License as published by +* the Free Software Foundation; either version 2 of the License, or +* (at your option) any later version. +* +* The GNU General Public License can be found at +* http://www.gnu.org/copyleft/gpl.html. +* A copy is found in the textfile GPL.txt and important notices to the license +* from the author is found in LICENSE.txt distributed with these scripts. +* +* +* This script is distributed in the hope that it will be useful, +* but WITHOUT ANY WARRANTY; without even the implied warranty of +* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +* GNU General Public License for more details. +* +* This copyright notice MUST APPEAR in all copies of the script! +***************************************************************/ + + +/** + * Interface for classes which hook into pageSelect and do additional getPage processing + * + * @author Christian Kuhn + * @package TYPO3 + * @subpackage t3lib + */ + +interface t3lib_pageSelect_getPageHook { + + /** + * Modifies the DB params + * + * @param integer The page ID + * @param boolean If set, the check for group access is disabled. VERY rarely used + * @param t3lib_pageSelect parent t3lib_pageSelect object + * @return void + */ + public function getPage_preProcess(&$uid, &$disableGroupAccessCheck, t3lib_pageSelect $parentObject); + +} + +?> Index: t3lib/class.t3lib_page.php =================================================================== --- t3lib/class.t3lib_page.php (Revision 5844) +++ t3lib/class.t3lib_page.php (Arbeitskopie) @@ -188,6 +188,19 @@ * @see getPage_noCheck() */ function getPage($uid, $disableGroupAccessCheck=FALSE) { + // Hook to manipulate the page uid for special overlay handling + if (is_array($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPage'])) { + foreach ($GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_page.php']['getPage'] as $classRef) { + $hookObject = t3lib_div::getUserObj($classRef); + + if (!($hookObject instanceof t3lib_pageSelect_getPageHook)) { + throw new UnexpectedValueException('$hookObject must implement interface t3lib_pageSelect_getPageHook', 1251476766); + } + + $hookObject->getPage_preProcess($uid, $disableGroupAccessCheck, $this); + } + } + $accessCheck = $disableGroupAccessCheck ? '' : $this->where_groupAccess; $cacheKey = md5($accessCheck . '-' . $this->where_hid_del . '-' . $this->sys_language_uid); Index: t3lib/core_autoload.php =================================================================== --- t3lib/core_autoload.php (Revision 5844) +++ t3lib/core_autoload.php (Arbeitskopie) @@ -40,6 +40,7 @@ 't3lib_matchcondition' => PATH_t3lib . 'class.t3lib_matchcondition.php', 't3lib_modsettings' => PATH_t3lib . 'class.t3lib_modsettings.php', 't3lib_pageselect' => PATH_t3lib . 'class.t3lib_page.php', + 't3lib_pageselect_getpagehook' => PATH_t3lib . 'interfaces/interface.t3lib_pageselect_getpagehook.php', 't3lib_pagetree' => PATH_t3lib . 'class.t3lib_pagetree.php', 't3lib_parsehtml' => PATH_t3lib . 'class.t3lib_parsehtml.php', 't3lib_parsehtml_proc' => PATH_t3lib . 'class.t3lib_parsehtml_proc.php',