From 1b0c8da592ae58e7db79fa075014c76af00fa9bf Mon Sep 17 00:00:00 2001 From: Frank Dillon Date: Wed, 9 Aug 2006 23:11:16 +0000 Subject: [PATCH] added cookieTTL method which returns the time to live of cookies set in the config file. --- lib/WebGUI/Config.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/lib/WebGUI/Config.pm b/lib/WebGUI/Config.pm index 215acbfb6..99eed4f59 100644 --- a/lib/WebGUI/Config.pm +++ b/lib/WebGUI/Config.pm @@ -237,6 +237,18 @@ sub getCookieName { return $self->get("cookieName") || "wgSession"; } +#------------------------------------------------------------------- + +=head2 getCookieTTL ( ) + +Returns the cookie time to live defined in the config file. Returns "10y" if one isn't defined. + +=cut + +sub getCookieTTL { + my $self = shift; + return $self->get("cookieTTL") || "+10y"; +} #-------------------------------------------------------------------