moved filter update on folder rename/delete to
[squirrelmail.git] / src / validate.php
index 27573401535d489b991b940fbf90e3180a75e405..60af3509c4a0a8951319eb823b13107b8d6f7943 100644 (file)
@@ -9,11 +9,6 @@
 * $Id$
 */
 
-global $username, $attachment_dir;
-
-require_once('../functions/prefs.php');
-
-session_save_path( getHashedDir($username, $attachment_dir) );
 session_start();
 
 require_once('../functions/i18n.php');
@@ -26,10 +21,10 @@ is_logged_in();
 if (get_magic_quotes_gpc()) {
     global $REQUEST_METHOD;
 
-    if ($REQUEST_METHOD == "POST") {
+    if ($REQUEST_METHOD == 'POST') {
         global $HTTP_POST_VARS;
         RemoveSlashes($HTTP_POST_VARS);
-    } else if ($REQUEST_METHOD == "GET") {
+    } else if ($REQUEST_METHOD == 'GET') {
         global $HTTP_GET_VARS;
         RemoveSlashes($HTTP_GET_VARS);
     }
@@ -48,7 +43,7 @@ global $send, $PHP_SELF;
 if (isset($send)
     && (substr($send, 0, 1) == "\n")
     && (substr($PHP_SELF, -12) == '/compose.php')) {
-    if ($REQUEST_METHOD == "POST") {
+    if ($REQUEST_METHOD == 'POST') {
         global $HTTP_POST_VARS;
         TrimArray($HTTP_POST_VARS);
     } else {
@@ -74,4 +69,9 @@ require_once('../functions/prefs.php');
 /* Set up the language (i18n.php was included by auth.php). */
 global $username, $data_dir;
 set_up_language(getPref($data_dir, $username, 'language'));
+
+$timeZone = getPref($data_dir, $username, 'timezone');
+if ( $timeZone ) {
+    putenv("TZ=".$timeZone);
+}
 ?>