Exemplo n.º 1
0
}
$is_allowed_to_edit = api_is_allowed_to_edit(false, true);
// The page we are dealing with
$page = isset($_GET['title']) ? $_GET['title'] : 'index';
$action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : 'showpage';
$view = isset($_GET['view']) ? Security::remove_XSS($_GET['view']) : null;
$wiki->page = $page;
$wiki->action = $action;
// Setting wiki data
if (!empty($view)) {
    $wiki->setWikiData($view);
}
$wiki->blockConcurrentEditions(api_get_user_id(), $action);
/* MAIN WIKI AREA */
ob_start();
$handleAction = $wiki->handleAction($action);
if (!$handleAction && $action == 'export_to_pdf') {
    $wiki->handleAction('showpage');
}
$content = ob_get_contents();
ob_end_clean();
Display::display_header($tool_name, 'Wiki');
// check last version
if (!empty($view)) {
    $wiki->checkLastVersion($view);
}
// Tool introduction
Display::display_introduction_section(TOOL_WIKI);
$wiki->showActionBar();
echo $wiki->getMessages();
echo $content;
Exemplo n.º 2
0
            api_not_allowed();
        }
    }
}
$is_allowed_to_edit = api_is_allowed_to_edit(false, true);
// The page we are dealing with
$page = isset($_GET['title']) ? $_GET['title'] : 'index';
$action = isset($_GET['action']) ? Security::remove_XSS($_GET['action']) : 'showpage';
$view = isset($_GET['view']) ? Security::remove_XSS($_GET['view']) : null;
$wiki->page = $page;
$wiki->action = $action;
// Setting wiki data
if (!empty($view)) {
    $wiki->setWikiData($view);
}
$wiki->blockConcurrentEditions(api_get_user_id(), $action);
/* MAIN WIKI AREA */
ob_start();
$wiki->handleAction($action);
$content = ob_get_contents();
ob_end_clean();
Display::display_header($tool_name, 'Wiki');
// check last version
if (!empty($view)) {
    $wiki->checkLastVersion($view);
}
// Tool introduction
Display::display_introduction_section(TOOL_WIKI);
$wiki->showActionBar();
echo $wiki->getMessages();
echo $content;