tiki  21.2
About: Tiki Wiki is a Groupware/CMS (Content Management System) solution that has features like Wikis, Forums, Blogs, Articles, Image Gallery, Map Server, Link Directory, Multilingual Support, Bug Tracker, RSS Feeds etc. Latest release 21 with Long Term Support (LTS).
  Fossies Dox: tiki-21.2.tar.xz  ("unofficial" and yet experimental doxygen-generated source code documentation)  

tiki-export_wiki_pages.php
Go to the documentation of this file.
1 <?php
2 // (c) Copyright by authors of the Tiki Wiki CMS Groupware Project
3 //
4 // All Rights Reserved. See copyright.txt for details and a complete list of authors.
5 // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
6 // $Id$
7 
8 require_once('tiki-setup.php');
9 
10 include_once("lib/ziplib.php");
11 include_once('lib/wiki/exportlib.php');
12 
13 $access->check_feature('feature_wiki_export');
14 if (empty($_REQUEST['page'])) {
15  $access->check_permission('tiki_p_export_wiki');
16 }
17 
18 if (! isset($_REQUEST["page"])) {
19  $exportlib->MakeWikiZip();
20  $dump = 'dump';
21  if (! empty($tikidomain)) {
22  $dump .= "/$tikidomain";
23  }
24  header("location: $dump/export.tar");
25 } else {
26  if (isset($_REQUEST["all"])) {
27  $all = 0;
28  } else {
29  $all = 1;
30  }
31 
32  $objectperms = Perms::get('wiki page', $_REQUEST['page']);
33  $latest = isset($_REQUEST['latest']) && $objectperms->wiki_view_latest;
34 
35  if (! $objectperms->view) {
36  die('Permission denied.');
37  }
38 
39  $data = $exportlib->export_wiki_page($_REQUEST["page"], $all, $latest);
40 
41  $page = $_REQUEST["page"];
42  header("Content-type: application/unknown");
43  header("Content-Disposition: inline; filename=$page");
44  echo $data;
45 }
Perms\get
static get($context=[])
Definition: Perms.php:117
$latest
$latest
Definition: tiki-export_wiki_pages.php:33
$data
if(! $objectperms->view) $data
Definition: tiki-export_wiki_pages.php:39
$_REQUEST
$_REQUEST["fgal_podcast_dir"]
Definition: include_fgal.php:25
php
$access
$access
Definition: include_rating.php:15
$tikidomain
global $tikidomain
Definition: include_wiki.php:13
$all
$all
Definition: tiki-admin_integrator_rules.php:30
$page
$page
Definition: tiki-export_wiki_pages.php:41
die
die
Definition: about.php:68
$exportlib
$exportlib
Definition: exportlib.php:108
$objectperms
$objectperms
Definition: tiki-accounting.php:44