summaryrefslogtreecommitdiff
path: root/modules/gallery/helpers/gallery.php
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2010-10-09 16:24:58 -0700
committerBharat Mediratta <bharat@menalto.com>2010-10-09 16:24:58 -0700
commit84731437a7b8cac4a5e3b2c382a20f67f563b04f (patch)
treee70dcd27d0b3fc526eb0e8110a2405b8b33b9248 /modules/gallery/helpers/gallery.php
parent5d4b683752d8a01628e0d9a5243d58909f8dfcd0 (diff)
Identify robots and don't let them save sessions.
Diffstat (limited to 'modules/gallery/helpers/gallery.php')
-rw-r--r--modules/gallery/helpers/gallery.php5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/gallery/helpers/gallery.php b/modules/gallery/helpers/gallery.php
index e2b74b89..ac51e2a6 100644
--- a/modules/gallery/helpers/gallery.php
+++ b/modules/gallery/helpers/gallery.php
@@ -74,6 +74,11 @@ class gallery_Core {
* request should implement the <module>_event::gallery_ready() handler.
*/
static function ready() {
+ // Don't keep a session for robots; it's a waste of database space.
+ if (request::user_agent("robot")) {
+ Session::instance()->abort_save();
+ }
+
module::event("gallery_ready");
}