tiki-switch_perspective.php 784 Bytes
Newer Older
1
<?php
changi67's avatar
changi67 committed
2 3 4
/**
 * @package tikiwiki
 */
5
// (c) Copyright 2002-2016 by authors of the Tiki Wiki CMS Groupware Project
changi67's avatar
changi67 committed
6 7 8 9
// 
// All Rights Reserved. See copyright.txt for details and a complete list of authors.
// Licensed under the GNU LESSER GENERAL PUBLIC LICENSE. See license.txt for details.
// $Id$
10 11

require_once 'tiki-setup.php';
12
$perspectivelib = TikiLib::lib('perspective');
13

14
$access->check_feature('feature_perspective');
15

16
unset($_SESSION['current_perspective']);
drsassafras's avatar
drsassafras committed
17
unset($_SESSION['current_perspective_name']);
18

19
if ( isset($_REQUEST['perspective']) ) {
oeversetten's avatar
oeversetten committed
20
	$perspectivelib->set_perspective($_REQUEST['perspective']);
21 22
}

23
if ( isset($_REQUEST['back']) && isset($_SERVER['HTTP_REFERER']) ) {
24
	$access->redirect($_SERVER['HTTP_REFERER']);
25
} else {
lphuberdeau's avatar
lphuberdeau committed
26
	$access->redirect('index.php');
27
}
28 29

// EOF