diff options
author | Evan Prodromou <evan@controlyourself.ca> | 2009-06-27 06:20:24 -0700 |
---|---|---|
committer | Evan Prodromou <evan@controlyourself.ca> | 2009-06-27 06:20:24 -0700 |
commit | 71dad1ff62b842578656f34a1aa33f00399309e2 (patch) | |
tree | fcc8ec6f0580d4f2d83b48e305f72f5ad80a464f /lib | |
parent | 0ca22cf6e2bd80247520f7c1f83535f8de5fed0a (diff) |
use the session class to store sessions
Diffstat (limited to 'lib')
-rw-r--r-- | lib/common.php | 2 | ||||
-rw-r--r-- | lib/util.php | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/lib/common.php b/lib/common.php index bb1a4255d..3a5913f85 100644 --- a/lib/common.php +++ b/lib/common.php @@ -254,6 +254,8 @@ $config = 'oohembed' => array('endpoint' => 'http://oohembed.com/oohembed/'), 'search' => array('type' => 'fulltext'), + 'sessions' => + array('handle' => false), // whether to handle sessions ourselves ); $config['db'] = &PEAR::getStaticProperty('DB_DataObject','options'); diff --git a/lib/util.php b/lib/util.php index b3496a09e..2face6777 100644 --- a/lib/util.php +++ b/lib/util.php @@ -144,6 +144,9 @@ function common_ensure_session() $c = $_COOKIE[session_name()]; } if (!common_have_session()) { + if (common_config('sessions', 'handle')) { + Session::setSaveHandler(); + } @session_start(); if (!isset($_SESSION['started'])) { $_SESSION['started'] = time(); |