summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Almdal <tnalmdal@shaw.ca>2009-06-21 18:21:00 -0700
committerTim Almdal <tnalmdal@shaw.ca>2009-06-21 18:21:00 -0700
commit284fea0870bd0087db168bb2dfca6ae62c1b0849 (patch)
tree7389db6dcca02a270f015580e5cdf4ebf4fc00d4
parent39cf3c2b046b03691937e112268403130508da63 (diff)
parent49975f10b9982d95b36681be536f3f70fa46dbf4 (diff)
Merge branch 'master' of git@github.com:gallery/gallery3
-rw-r--r--modules/gallery/controllers/file_proxy.php3
-rw-r--r--system/libraries/Session.php13
-rw-r--r--system/libraries/drivers/Session/Database.php4
-rw-r--r--themes/default/views/header.html.php2
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 ?>