1<?php 2/** 3 * @package tikiwiki 4 */ 5// (c) Copyright by authors of the Tiki Wiki CMS Groupware Project 6// 7// All Rights Reserved. See copyright.txt for details and a complete list of authors. 8// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details. 9// $Id$ 10 11require_once('tiki-setup.php'); 12$histlib = TikiLib::lib('hist'); 13 14$access->check_feature('feature_wiki'); 15$access->check_permission('tiki_p_admin'); 16 17// We have to get the variable ruser as the user to check 18if (! isset($_REQUEST["ruser"])) { 19 $smarty->assign('msg', tra("No user indicated")); 20 $smarty->display("error.tpl"); 21 die; 22} 23if (! user_exists($_REQUEST["ruser"])) { 24 $smarty->assign('msg', tra("Non-existent user")); 25 $smarty->display("error.tpl"); 26 die; 27} 28$smarty->assign_by_ref('ruser', $_REQUEST["ruser"]); 29$smarty->assign('preview', false); 30if (isset($_REQUEST["preview"])) { 31 $version = $histlib->get_version($_REQUEST["page"], $_REQUEST["version"]); 32 $version["data"] = TikiLib::lib('parser')->parse_data($version["data"]); 33 if ($version) { 34 $smarty->assign_by_ref('preview', $version); 35 $smarty->assign_by_ref('version', $_REQUEST["version"]); 36 } 37} 38$history = $histlib->get_user_versions($_REQUEST["ruser"]); 39$smarty->assign_by_ref('history', $history); 40ask_ticket('userversion'); 41$smarty->assign('mid', 'tiki-userversions.tpl'); 42$smarty->display("tiki.tpl"); 43