[Rt-commit] r2744 - in rt/branches/3.4-RELEASE: . html/Elements

jesse at bestpractical.com jesse at bestpractical.com
Sun Apr 17 21:44:51 EDT 2005


Author: jesse
Date: Sun Apr 17 21:44:50 2005
New Revision: 2744

Modified:
   rt/branches/3.4-RELEASE/   (props changed)
   rt/branches/3.4-RELEASE/html/Elements/SetupSessionCookie
Log:
 r13193 at hualien:  jesse | 2005-04-17 21:26:35 -0400
 RT-Ticket: 6657
 RT-Status: resolved
 
 * Better error message when the sessions table or sessions dir isn't writable
 


Modified: rt/branches/3.4-RELEASE/html/Elements/SetupSessionCookie
==============================================================================
--- rt/branches/3.4-RELEASE/html/Elements/SetupSessionCookie	(original)
+++ rt/branches/3.4-RELEASE/html/Elements/SetupSessionCookie	Sun Apr 17 21:44:50 2005
@@ -75,18 +75,25 @@
 
         # 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"
+              . $@;
         }
     }
 


More information about the Rt-commit mailing list