diff options
-rw-r--r-- | modules/gallery/controllers/file_proxy.php | 3 | ||||
-rw-r--r-- | system/libraries/Session.php | 13 | ||||
-rw-r--r-- | system/libraries/drivers/Session/Database.php | 4 | ||||
-rw-r--r-- | themes/default/views/header.html.php | 2 |
4 files changed, 21 insertions, 1 deletions
diff --git a/modules/gallery/controllers/file_proxy.php b/modules/gallery/controllers/file_proxy.php index 1f885e53..0d64bcd9 100644 --- a/modules/gallery/controllers/file_proxy.php +++ b/modules/gallery/controllers/file_proxy.php @@ -112,6 +112,9 @@ class File_Proxy_Controller extends Controller { kohana::show_404(); } + // We don't need to save the session for this request + Session::abort_save(); + // Dump out the image header("Content-Type: $item->mime_type"); Kohana::close_buffers(false); 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, diff --git a/themes/default/views/header.html.php b/themes/default/views/header.html.php index 1e70b7ac..e1e52bda 100644 --- a/themes/default/views/header.html.php +++ b/themes/default/views/header.html.php @@ -4,7 +4,7 @@ <?= $header_text ?> <? else: ?> <a href="<?= url::site("albums/1") ?>"> - <img id="gLogo" alt="<?= t("Gallery: Your photos on your web site") ?>" src="<?= $theme->url("images/logo.png") ?>" /> + <img width="107" height="48" id="gLogo" alt="<?= t("Gallery: Your photos on your web site") ?>" src="<?= $theme->url("images/logo.png") ?>" /> </a> <? endif ?> |