Project

General

Profile

« Previous | Next » 

Revision 582

Added by thorn over 16 years ago

fixed bug in changeset 581 (reverts most of it)

View differences:

save.php
23 23

  
24 24
*/
25 25

  
26
// Start a session

26
// Start a session
27 27
if(!defined('SESSION_STARTED')) {
28
	// get random-part for session_name()
29
	list($usec,$sec) = explode(' ',microtime());
30
	srand((float)$sec+((float)$usec*100000));
31
	$session_rand = rand(1000,9999);
32
	session_name("wb_{$session_rand}_session_id");
28
	session_name('wb_session_id');
33 29
	session_start();
34
	$_SESSION['SESSION_RAND'] = $session_rand;
35
	define('SESSION_STARTED', true);
36
} else {
37
	$session_rand = $_SESSION['SESSION_RAND'];
38
}
30
	define('SESSION_STARTED', true);
31
}
32
// get random-part for session_name()
33
list($usec,$sec) = explode(' ',microtime());
34
srand((float)$sec+((float)$usec*100000));
35
$session_rand = rand(1000,9999);
39 36

  
40 37
// Function to set error
41 38
function set_error($message) {

Also available in: Unified diff