Skip to content

Commit

Permalink
Identify robots and don't let them save sessions.
Browse files Browse the repository at this point in the history
  • Loading branch information
bharat committed Oct 9, 2010
1 parent 5d4b683 commit 8473143
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions modules/gallery/helpers/gallery.php
Expand Up @@ -74,6 +74,11 @@ static function private_gallery() {
* 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");
}

Expand Down

0 comments on commit 8473143

Please sign in to comment.