diff options
Diffstat (limited to 'core/hooks/init_gallery.php')
-rw-r--r-- | core/hooks/init_gallery.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/core/hooks/init_gallery.php b/core/hooks/init_gallery.php index 27a4d8a4..89f97ef9 100644 --- a/core/hooks/init_gallery.php +++ b/core/hooks/init_gallery.php @@ -21,3 +21,14 @@ Event::add("system.ready", array("I18n", "instance")); Event::add("system.post_routing", array("theme", "load_themes")); Event::add("system.ready", array("module", "load_modules")); Event::add("system.post_routing", array("url", "parse_url")); + +// Override the cookie if we have a session id in the URL. +// @todo This should probably be an event callback +$input = Input::instance(); +if ($g3sid = $input->post("g3sid", $input->get("g3sid"))) { + $_COOKIE["g3sid"] = $g3sid; +} + +if ($user_agent = $input->post("user_agent", $input->get("user_agent"))) { + Kohana::$user_agent = $user_agent; +} |