Esempio n. 1
0
}
if (!$page->allows(Wicked::MODE_DISPLAY)) {
    if ($page->pageName() == 'Wiki/Home') {
        throw new Wicked_Exception(_("You don't have permission to view this page."));
    }
    $notification->push(_("You don't have permission to view this page."), 'horde.error');
    $page = Wicked_Page::getPage('');
}
$params = Horde_Util::getFormData('params', Horde_Util::getFormData('searchfield'));
$page->preDisplay(Wicked::MODE_DISPLAY, $params);
if ($page->isLocked()) {
    $notification->push(sprintf(_("This page is locked by %s for %d Minutes."), $page->getLockRequestor(), $page->getLockTime()), 'horde.message');
}
$history = $session->get('wicked', 'history', Horde_Session::TYPE_ARRAY);
Horde::startBuffer();
echo $page->render(Wicked::MODE_DISPLAY, $params);
$content = Horde::endBuffer();
Wicked::addFeedLink();
Wicked::setTopbar();
$page_output->header(array('title' => $page->pageTitle()));
$notification->notify(array('listeners' => 'status'));
echo $content;
$page_output->footer();
if ($page instanceof Wicked_Page_StandardPage && (!isset($history[0]) || $history[0] != $page->pageName())) {
    array_unshift($history, $page->pageName());
    $session->set('wicked', 'history', $history);
}
if (count($history) > 10) {
    array_pop($history);
    $session->set('wicked', 'history', $history);
}