Skip to content

Commit

Permalink
Fix bug #9361: Add configuration of PHP session path.
Browse files Browse the repository at this point in the history
git-svn-id: http://mantisbt.svn.sourceforge.net/svnroot/mantisbt/trunk@5441 f5dc347c-c33d-0410-90a0-b07cc1902cb9
  • Loading branch information
amyreese committed Jul 28, 2008
1 parent 4c4645f commit a536499
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
5 changes: 4 additions & 1 deletion config_defaults_inc.php
Expand Up @@ -166,6 +166,9 @@
# 'memcached' -> Memcached storage sessions
$g_session_handler = 'php';

# Session save path. If null, uses default value as set by session handler.
$g_session_save_path = null;

#############################
# Configuration Settings
#############################
Expand Down Expand Up @@ -2022,4 +2025,4 @@

# Enables or disables the mind mapping features including ability to export Freemind files and
# in browser view of generated mindmaps.
$g_mindmap_enabled = ON;
$g_mindmap_enabled = ON;
5 changes: 5 additions & 0 deletions core/session_api.php
Expand Up @@ -50,6 +50,11 @@ abstract function destroy();
*/
class MantisPHPSession extends MantisSession {
function __construct() {
$t_session_save_path = config_get_global( 'session_save_path' );
if ( !is_null( $t_session_save_path ) ) {
session_save_path( $t_session_save_path );
}

session_start();
$this->id = session_id();
}
Expand Down

0 comments on commit a536499

Please sign in to comment.