$group_name = $result->name; $navigation[] = array('url' => '../group/index.php?course=' . $course_code, 'name' => $langGroups); $navigation[] = array('url' => '../group/group_space.php?course=' . $course_code, 'name' => $group_name); } } else { //redirect user to course wiki header("Location: index.php?course={$course_code}"); exit; } } } else { $groupId = 0; } // Objects instantiation $wikiStore = new WikiStore(); if (!$wikiStore->wikiIdExists($wikiId)) { die($langWikiInvalidWikiId); draw($tool_content, 2, null, $head_content); } $wiki = $wikiStore->loadWiki($wikiId); $wikiPage = new WikiPage($wikiId); $wikiRenderer = new Wiki2xhtmlRenderer($wiki); $accessControlList = $wiki->getACL(); // --------------- Start of access rights management -------------- // Wiki access levels $is_allowedToEdit = false; $is_allowedToRead = false; $is_allowedToCreate = false; // set user access rights using user status and wiki access control list if ($groupId != 0 && $is_groupAllowed) { // group_context
$config['tbl_wiki_pages'] = $tblList['wiki_pages']; $config['tbl_wiki_pages_content'] = $tblList['wiki_pages_content']; $config['tbl_wiki_acls'] = $tblList['wiki_acls']; $con = Claroline::getDatabase(); // DEVEL_MODE database initialisation if (defined('DEVEL_MODE') && DEVEL_MODE == true) { init_wiki_tables($con, false); } // Objects instantiation $wikiStore = new WikiStore($con, $config); $wikiList = array(); // --------- Start of command processing ---------------- switch ($action) { case 'exExport': require_once "lib/class.wiki2xhtmlexport.php"; if (!$wikiStore->wikiIdExists($wikiId)) { // die( get_lang("Invalid Wiki Id") ); $message = get_lang("Invalid Wiki Id"); $dialogBox->error($message); $action = 'error'; } else { $wiki = $wikiStore->loadWiki($wikiId); $wikiTitle = $wiki->getTitle(); $renderer = new WikiToSingleHTMLExporter($wiki); $contents = $renderer->export(); if (0 != $groupId) { $groupPart = '_group' . (int) $groupId; } else { $groupPart = ''; } require_once get_conf('includePath') . '/lib/fileUpload.lib.php';