Exemplo n.º 1
0
        check_ticket('index');
        if ($_REQUEST['action'] == 'unlock') {
            $wikilib->unlock_page($page);
            $pageRenderer->setInfo('flag', 'U');
            $info['flag'] = 'U';
        }
    }
}
// Save to notepad if user wants to
if ($user && $objectperms->notepad && $prefs['feature_notepad'] == 'y' && isset($_REQUEST['savenotepad'])) {
    check_ticket('index');
    $tikilib->replace_note($user, 0, $page, $info['data']);
}
// Process an undo here
if (isset($_REQUEST['undo'])) {
    if ($pageRenderer->canUndo()) {
        $access->check_authenticity();
        // Remove the last version
        $wikilib->remove_last_version($page);
        // If page was deleted then re-create
        if (!$tikilib->page_exists($page)) {
            $tikilib->create_page($page, 0, '', $tikilib->now, 'Tiki initialization');
        }
        // Restore page information
        $info = $tikilib->get_page_info($page);
        $pageRenderer->setInfos($info);
    }
}
if (isset($_REQUEST['refresh'])) {
    check_ticket('index');
    $tikilib->invalidate_cache($page);