// Watches
if ($gBitSystem->isFeatureActive('users_watches')) {
    if (!empty($_REQUEST['watch_event'])) {
        if ($gBitUser->isRegistered()) {
            if ($_REQUEST['watch_action'] == 'add') {
                $gBitUser->storeWatch($_REQUEST['watch_event'], $_REQUEST['watch_object'], $gContent->mContentTypeGuid, $gContent->mPageName, $gContent->getDisplayUrl());
            } else {
                $gBitUser->expungeWatch($_REQUEST['watch_event'], $_REQUEST['watch_object']);
            }
        } else {
            $gBitSystem->fatalError(tra("This feature requires a registered user. ") . ": users_watches");
        }
    }
    if ($watch = $gBitUser->getEventWatches('wiki_page_changed', $gContent->mPageId)) {
        $gBitSmarty->assign('user_watching_page', 'y');
    }
}
if ($gContent->isValid() && $gBitSystem->isPackageActive('stickies')) {
    require_once STICKIES_PKG_PATH . 'BitSticky.php';
    global $gNote;
    $gNote = new BitSticky(NULL, NULL, $gContent->mContentId);
    $gNote->load();
    $gBitSmarty->assignByRef('stickyInfo', $gNote->mInfo);
}
// Display the Index Template
$gBitSmarty->assignByRef('pageInfo', $gContent->mInfo);
// S5 slideshows
if (isset($_REQUEST['s5'])) {
    include_once WIKI_PKG_PATH . 's5.php';
}
$gBitSystem->display('bitpackage:wiki/show_page.tpl', $gContent->mInfo['title'], array('display_mode' => 'display'));
Exemple #2
0
    $blog_id = NULL;
}
// cheap wiki-only hack for now
require_once WIKI_PKG_PATH . 'lookup_page_inc.php';
require_once LIBERTY_PKG_PATH . 'lookup_content_inc.php';
if (!$gContent->isvalid() && !empty($_REQUEST['notated_content_id'])) {
    if ($viewContent = $gContent->getLibertyObject($_REQUEST['notated_content_id'])) {
        $gBitSmarty->assign_by_ref('pageInfo', $viewContent->mInfo);
        $gContent =& $viewContent;
        $gBitSmarty->assign_by_ref('gContent', $gContent);
    }
}
if (!$gContent->isvalid()) {
    $gBitSystem->fatalError(tra('Unknown content to create sticky note'));
}
$gSticky = new BitSticky(isset($_REQUEST['sticky_id']) ? $_REQUEST['sticky_id'] : '', NULL, $gContent->mContentId);
if (!$gSticky->load()) {
    $gSticky->mInfo['notated_content_id'] = $gContent->mContentId;
}
if (!empty($_REQUEST['save_sticky'])) {
    if ($gSticky->store($_REQUEST)) {
        header('Location: ' . $gContent->getDisplayUrl());
    }
} elseif (!empty($_REQUEST['preview'])) {
} elseif (!empty($_REQUEST['delete'])) {
    $formHash['content_id'] = $gContent->mContentId;
    $formHash['sticky_id'] = $gSticky->mStickyId;
    $formHash['delete'] = TRUE;
    if (!empty($_POST['confirm'])) {
        if ($gSticky->expunge()) {
            header('Location: ' . $gContent->getDisplayUrl());