} $structlib->s_export_structure($_REQUEST['export']); } if (isset($_REQUEST['zip']) && $tiki_p_admin == 'y') { check_ticket('admin-structures'); include_once 'lib/wiki/xmllib.php'; $xmllib = new XmlLib(); $zipFile = 'dump/xml.zip'; $config['debug'] = false; if ($xmllib->export_pages(null, $_REQUEST['zip'], $zipFile, $config)) { if (!$config['debug']) { header("location: {$zipFile}"); die; } } else { $smarty->assign('error', $xmllib->get_error()); } } if (isset($_REQUEST['export_tree'])) { check_ticket('admin-structures'); $structure_info = $structlib->s_get_structure_info($_REQUEST['export_tree']); if (!$tikilib->user_has_perm_on_object($user, $structure_info["pageName"], 'wiki page', 'tiki_p_view')) { $smarty->assign('errortype', 401); $smarty->assign('msg', tra('You do not have permission to view this page.')); $smarty->display("error.tpl"); die; } header("content-type: text/plain"); $structlib->s_export_structure_tree($_REQUEST['export_tree']); die; }