diff options
| author | jhilden <jakobhilden@gmail.com> | 2009-06-29 16:03:45 -0400 |
|---|---|---|
| committer | jhilden <jakobhilden@gmail.com> | 2009-06-29 16:03:45 -0400 |
| commit | b31b3bd5bff4f8d5b5721e0fdd86579028a5b03a (patch) | |
| tree | 9baa2a301c1e26dcf872e0bbfbb09be34cb020d5 /system/libraries | |
| parent | eb82f6a64a6b4e0b4e18ca92689bd467cba6e1bd (diff) | |
| parent | 5de6de6a133c6c906ee63b5a2ab1b08bc14ca17e (diff) | |
Merge branch 'master' of git@github.com:gallery/gallery3
Diffstat (limited to 'system/libraries')
| -rw-r--r-- | system/libraries/Session.php | 13 | ||||
| -rw-r--r-- | system/libraries/drivers/Session/Database.php | 4 |
2 files changed, 17 insertions, 0 deletions
diff --git a/system/libraries/Session.php b/system/libraries/Session.php index e03f5dff..61a0d403 100644 --- a/system/libraries/Session.php +++ b/system/libraries/Session.php @@ -27,6 +27,9 @@ class Session_Core { // Input library protected $input; + // Automatically save the session by default + public static $should_save = true; + /** * Singleton instance of Session. */ @@ -455,4 +458,14 @@ class Session_Core { } } + /** + * Do not save this session. + * + * @return void + */ + public function abort_save() { + Session::$should_save = false; + + } + } // End Session Class diff --git a/system/libraries/drivers/Session/Database.php b/system/libraries/drivers/Session/Database.php index b4144ffb..b8993a9e 100644 --- a/system/libraries/drivers/Session/Database.php +++ b/system/libraries/drivers/Session/Database.php @@ -98,6 +98,10 @@ class Session_Database_Driver implements Session_Driver { public function write($id, $data) { + if (!Session::$should_save) { + return true; + } + $data = array ( 'session_id' => $id, |
