Not used anywhere so removing it $document_root_parent

This commit is contained in:
FusionPBX 2020-05-26 19:59:58 -06:00 committed by GitHub
parent 65806db347
commit e21c6f165d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 16 additions and 19 deletions

View File

@ -24,26 +24,23 @@
Mark J Crane <markjcrane@fusionpbx.com>
*/
//session handling
//start the session
if (function_exists('session_start')) {
if (!isset($_SESSION)) {
session_start();
}
//session handling
//start the session
if (function_exists('session_start')) {
if (!isset($_SESSION)) {
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") {
$_SESSION['session']['last_activity'] = time();
if (!isset($_SESSION['session']['created'])) {
$_SESSION['session']['created'] = time();
} else if (time() - $_SESSION['session']['created'] > 28800) {
// session started more than 8 hours ago
session_regenerate_id(true); // rotate the session id
$_SESSION['session']['created'] = time(); // update creation time
}
}
//regenerate sessions to avoid session id attacks such as session fixation
if (array_key_exists('security',$_SESSION) && $_SESSION['security']['session_rotate']['boolean'] == "true") {
$_SESSION['session']['last_activity'] = time();
if (!isset($_SESSION['session']['created'])) {
$_SESSION['session']['created'] = time();
} else if (time() - $_SESSION['session']['created'] > 28800) {
// session started more than 8 hours ago
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), '/');
}
?>