From 2bd7f83a6495011ada78ca8a9f2af417caf01760 Mon Sep 17 00:00:00 2001 From: ahriman Date: Wed, 2 Jan 2019 04:57:35 +0000 Subject: removed dokuwiki --- wiki/inc/Action/Export.php | 112 --------------------------------------------- 1 file changed, 112 deletions(-) delete mode 100644 wiki/inc/Action/Export.php (limited to 'wiki/inc/Action/Export.php') diff --git a/wiki/inc/Action/Export.php b/wiki/inc/Action/Export.php deleted file mode 100644 index 1eec27e..0000000 --- a/wiki/inc/Action/Export.php +++ /dev/null @@ -1,112 +0,0 @@ - - * @author Michael Klier - * @inheritdoc - */ - public function preProcess() { - global $ID; - global $REV; - global $conf; - global $lang; - - $pre = ''; - $post = ''; - $headers = array(); - - // search engines: never cache exported docs! (Google only currently) - $headers['X-Robots-Tag'] = 'noindex'; - - $mode = substr($this->actionname, 7); - switch($mode) { - case 'raw': - $headers['Content-Type'] = 'text/plain; charset=utf-8'; - $headers['Content-Disposition'] = 'attachment; filename=' . noNS($ID) . '.txt'; - $output = rawWiki($ID, $REV); - break; - case 'xhtml': - $pre .= '' . DOKU_LF; - $pre .= '' . DOKU_LF; - $pre .= '' . DOKU_LF; - $pre .= ' ' . DOKU_LF; // FIXME improve wrapper - $pre .= ' ' . $ID . '' . DOKU_LF; - - // get metaheaders - ob_start(); - tpl_metaheaders(); - $pre .= ob_get_clean(); - - $pre .= '' . DOKU_LF; - $pre .= '' . DOKU_LF; - $pre .= '
' . DOKU_LF; - - // get toc - $pre .= tpl_toc(true); - - $headers['Content-Type'] = 'text/html; charset=utf-8'; - $output = p_wiki_xhtml($ID, $REV, false); - - $post .= '
' . DOKU_LF; - $post .= '' . DOKU_LF; - $post .= '' . DOKU_LF; - break; - case 'xhtmlbody': - $headers['Content-Type'] = 'text/html; charset=utf-8'; - $output = p_wiki_xhtml($ID, $REV, false); - break; - default: - $output = p_cached_output(wikiFN($ID, $REV), $mode, $ID); - $headers = p_get_metadata($ID, "format $mode"); - break; - } - - // prepare event data - $data = array(); - $data['id'] = $ID; - $data['mode'] = $mode; - $data['headers'] = $headers; - $data['output'] =& $output; - - trigger_event('ACTION_EXPORT_POSTPROCESS', $data); - - if(!empty($data['output'])) { - if(is_array($data['headers'])) foreach($data['headers'] as $key => $val) { - header("$key: $val"); - } - print $pre . $data['output'] . $post; - exit; - } - - throw new ActionAbort(); - } - -} -- cgit 1.4.1-2-gfad0