/
tiki-cookie-jar.php
29 lines (24 loc) · 1.01 KB
/
tiki-cookie-jar.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
// (c) Copyright 2002-2012 by authors of the Tiki Wiki CMS Groupware Project
//
// 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: tiki-cookie-jar.php 39467 2012-01-12 19:47:28Z changi67 $
/*
These 4 lines of code are a presentation of Louis-Philippe Huberdeau
For Tiki CMS/Groupware
Released under the same licence as the rest of the project
This page is only meant to be called from the browser's XMLHttpRequest
classes. All it does is grab the parameters and store them in the
session.
The parameters in the session will be stored under
$_SESSION['tiki_cookie_jar'][ $parameter_name ]
*/
$tikiroot = dirname($_SERVER['PHP_SELF']);
$session_params = session_get_cookie_params();
session_set_cookie_params($session_params['lifetime'], $tikiroot);
unset($session_params);
session_start();
if ( isset( $_GET ) )
foreach ( $_GET as $key=>$value )
$_SESSION['tiki_cookie_jar'][$key] = $value;