From 058f46f1a5dd2ebfdfe507f0bf3051c0125b53b1 Mon Sep 17 00:00:00 2001 From: Christian Boltz Date: Thu, 14 Jul 2011 21:27:07 +0000 Subject: [PATCH] users/vacation.php, edit-vacation.php, backup.php: - supress warnings about PHP's date.timezone not set. The risk of doing this is low IMHO - the worst thing that can happen is a wrong default date for vacation or a "wrong" tempfile name for backup.php git-svn-id: https://svn.code.sf.net/p/postfixadmin/code/trunk@1076 a1433add-5e2c-0410-b055-b7f2511e0802 --- backup.php | 1 + edit-vacation.php | 3 +++ users/vacation.php | 2 ++ 3 files changed, 6 insertions(+) diff --git a/backup.php b/backup.php index 8a2ca441..f9e6c45e 100644 --- a/backup.php +++ b/backup.php @@ -72,6 +72,7 @@ if ($_SERVER['REQUEST_METHOD'] == "GET") { umask (077); $path = (ini_get('upload_tmp_dir') != '') ? ini_get('upload_tmp_dir') : '/tmp'; + date_default_timezone_set(@date_default_timezone_get()); # Suppress date.timezone warnings $filename = "postfixadmin-" . date ("Ymd") . "-" . getmypid() . ".sql"; $backup = $path . DIRECTORY_SEPARATOR . $filename; diff --git a/edit-vacation.php b/edit-vacation.php index fc3d5058..a35f4210 100644 --- a/edit-vacation.php +++ b/edit-vacation.php @@ -55,6 +55,9 @@ else { $fUsername = $SESSID_USERNAME; $fDomain = $USERID_DOMAIN; } + +date_default_timezone_set(@date_default_timezone_get()); # Suppress date.timezone warnings + $vh = new VacationHandler($fUsername); $vacation_domain = $CONF['vacation_domain']; $vacation_goto = preg_replace('/@/', '#', $fUsername); diff --git a/users/vacation.php b/users/vacation.php index b4036c35..040ed05c 100644 --- a/users/vacation.php +++ b/users/vacation.php @@ -42,6 +42,8 @@ if($CONF['vacation'] == 'NO') { exit(0); } +date_default_timezone_set(@date_default_timezone_get()); # Suppress date.timezone warnings + $vh = new VacationHandler(authentication_get_username()); if ($_SERVER['REQUEST_METHOD'] == "GET")