Example #1
0
    $this->session->setCookie('version', 'working');
    $this->displaymode = "working";
} else {
    // Delete Cookie
    $this->session->removeCookie("version");
    if ($version == "live") {
        unset($version);
    }
    $this->displaymode = "live";
}
$page = $pageMgr->getPage($pageID, $version);
// check if no permissions
if (!$page) {
    sUserMgr()->impersonate(sUserMgr()->getAdministratorID());
    $tmpPageMgr = new PageMgr($siteID);
    $tmpPage = $tmpPageMgr->getPublishedPage($pageID);
    if (!$tmpPage) {
        throwErrorPage('404');
    }
    $tmpPageinfo = $tmpPage->get();
    // Call callback
    $pageMgr->callExtensionHook("onAccessDenied", $siteID, $pageID, $tmpPageinfo['VERSION'], array("FILTER" => $filter, "CONTENTAREAS" => &$inhalte));
    sUserMgr()->unimpersonate();
    // Throw status 403
    throwErrorPage('403');
}
if ((int) $siteInfo['FAVICON'] > 0) {
    $sinfo['FAVICON_URL'] = $webroot_path_string . '/image/' . $sinfo['FAVICON'];
} else {
    $sinfo['FAVICON_URL'] = '';
}