/[pkg-tikiwiki]/trunk/tiki-userversions.php
ViewVC logotype

Contents of /trunk/tiki-userversions.php

Parent Directory Parent Directory | Revision Log Revision Log


Revision 11 - (show annotations) (download)
Tue Jul 11 06:27:24 2006 UTC (6 years, 11 months ago) by marcusb-guest
File size: 1755 byte(s)
Imported into trunk (integration branch).
1 <?php
2
3 // $Header: /cvsroot/tikiwiki/tiki/tiki-userversions.php,v 1.11.2.2 2005/01/05 19:45:28 jburleyebuilt Exp $
4
5 // Copyright (c) 2002-2005, Luis Argerich, Garland Foster, Eduardo Polidor, et. al.
6 // All Rights Reserved. See copyright.txt for details and a complete list of authors.
7 // Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
8
9 // Initialization
10 require_once ('tiki-setup.php');
11
12 include_once ('lib/wiki/histlib.php');
13
14 if ($feature_wiki != 'y') {
15 $smarty->assign('msg', tra("This feature is disabled").": feature_wiki");
16
17 $smarty->display("error.tpl");
18 die;
19 }
20
21 // Only an admin can use this script
22 if ($user != 'admin') {
23 if ($tiki_p_admin != 'y') {
24 $smarty->assign('msg', tra("You do not have permission to use this feature"));
25
26 $smarty->display("error.tpl");
27 die;
28 }
29 }
30
31 // We have to get the variable ruser as the user to check
32 if (!isset($_REQUEST["ruser"])) {
33 $smarty->assign('msg', tra("No user indicated"));
34
35 $smarty->display("error.tpl");
36 die;
37 }
38
39 if (!user_exists($_REQUEST["ruser"])) {
40 $smarty->assign('msg', tra("Non-existent user"));
41
42 $smarty->display("error.tpl");
43 die;
44 }
45
46 $smarty->assign_by_ref('ruser', $_REQUEST["ruser"]);
47 $smarty->assign('preview', false);
48
49 if (isset($_REQUEST["preview"])) {
50 $version = $histlib->get_version($_REQUEST["page"], $_REQUEST["version"]);
51
52 $version["data"] = $tikilib->parse_data($version["data"]);
53
54 if ($version) {
55 $smarty->assign_by_ref('preview', $version);
56
57 $smarty->assign_by_ref('version', $_REQUEST["version"]);
58 }
59 }
60
61 $history = $histlib->get_user_versions($_REQUEST["ruser"]);
62 $smarty->assign_by_ref('history', $history);
63
64 ask_ticket('userversion');
65
66 $smarty->assign('mid', 'tiki-userversions.tpl');
67 $smarty->display("tiki.tpl");
68
69 ?>

  ViewVC Help
Powered by ViewVC 1.1.5