Not used anywhere so removing it $document_root_parent
This commit is contained in:
parent
65806db347
commit
e21c6f165d
|
|
@ -24,26 +24,23 @@
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
*/
|
*/
|
||||||
|
|
||||||
//session handling
|
//session handling
|
||||||
//start the session
|
//start the session
|
||||||
if (function_exists('session_start')) {
|
if (function_exists('session_start')) {
|
||||||
if (!isset($_SESSION)) {
|
if (!isset($_SESSION)) {
|
||||||
session_start();
|
session_start();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
//regenerate sessions to avoid session id attacks such as session fixation
|
}
|
||||||
if (array_key_exists('security',$_SESSION) && $_SESSION['security']['session_rotate']['boolean'] == "true") {
|
//regenerate sessions to avoid session id attacks such as session fixation
|
||||||
$_SESSION['session']['last_activity'] = time();
|
if (array_key_exists('security',$_SESSION) && $_SESSION['security']['session_rotate']['boolean'] == "true") {
|
||||||
if (!isset($_SESSION['session']['created'])) {
|
$_SESSION['session']['last_activity'] = time();
|
||||||
$_SESSION['session']['created'] = time();
|
if (!isset($_SESSION['session']['created'])) {
|
||||||
} else if (time() - $_SESSION['session']['created'] > 28800) {
|
$_SESSION['session']['created'] = time();
|
||||||
// session started more than 8 hours ago
|
} else if (time() - $_SESSION['session']['created'] > 28800) {
|
||||||
session_regenerate_id(true); // rotate the session id
|
// session started more than 8 hours ago
|
||||||
$_SESSION['session']['created'] = time(); // update creation time
|
session_regenerate_id(true); // rotate the session id
|
||||||
}
|
$_SESSION['session']['created'] = time(); // update creation time
|
||||||
}
|
}
|
||||||
|
}
|
||||||
//get the document_root parent directory
|
|
||||||
$document_root_parent = join(array_slice(explode("\\",realpath($_SERVER["DOCUMENT_ROOT"])),0,-1), '/');
|
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue