X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fhtml%2FElements%2FSetupSessionCookie;h=bd786135596ab06a7f513f986acd42a9f5383fb2;hp=e72f458899a72e5f681d9a02eef36be20d635833;hb=9c68254528b6f2c7d8c1921b452fa56064783782;hpb=d39d52aac8f38ea9115628039f0df5aa3ac826de diff --git a/rt/html/Elements/SetupSessionCookie b/rt/html/Elements/SetupSessionCookie index e72f45889..bd7861355 100644 --- a/rt/html/Elements/SetupSessionCookie +++ b/rt/html/Elements/SetupSessionCookie @@ -1,8 +1,8 @@ -%# {{{ BEGIN BPS TAGGED BLOCK +%# BEGIN BPS TAGGED BLOCK {{{ %# %# COPYRIGHT: %# -%# This software is Copyright (c) 1996-2004 Best Practical Solutions, LLC +%# This software is Copyright (c) 1996-2005 Best Practical Solutions, LLC %# %# %# (Except where explicitly superseded by other copyright notices) @@ -42,7 +42,7 @@ %# works based on those contributions, and sublicense and distribute %# those contributions and any derivatives thereof. %# -%# }}} END BPS TAGGED BLOCK +%# END BPS TAGGED BLOCK }}} <%init> return if $m->is_subrequest; # avoid reentrancy, as suggested by masonbook @@ -75,18 +75,25 @@ my $pm = "$session_class.pm"; $pm =~ s|::|/|g; require $pm; # If the session is invalid, create a new session. if ( $@ =~ /Object does not/i ) { - tie %session, $session_class, undef, - $backends{$RT::DatabaseType} ? { + tie %session, $session_class, undef, $backends{$RT::DatabaseType} + ? { Handle => $RT::Handle->dbh, LockHandle => $RT::Handle->dbh, - } : { + } + : { Directory => $RT::MasonSessionDir, LockDirectory => $RT::MasonSessionDir, }; undef $cookies{$cookiename}; } else { - die "RT Couldn't write to session directory '$RT::MasonSessionDir': $@. Check that this dir ectory's permissions are correct."; + die loc("RT couldn't store your session.") . "\n" + . loc( +"This may mean that that the directory '[_1]' isn't writable or a database table is missing or corrupt.", + $RT::MasonSessionDir + ) + . "\n\n" + . $@; } }