r28278 - /trunk/calendar/inc/class.calendar_boupdate.inc.php

View: New views
1 Messages — Rating Filter:   Alert me  

r28278 - /trunk/calendar/inc/class.calendar_boupdate.inc.php

by ralfbecker :: Rate this Message:

Reply (Restricted by the Administrator) | Reply to Author | View Threaded | Show Only this Message

Author: ralfbecker
Date: Sat Nov  7 13:09:12 2009
New Revision: 28278

URL: http://www.egroupware.org/viewvc/egroupware?rev=28278&view=rev
Log:
"properly restoring user enviroment, after notifications send: spezially timezone"

Modified:
    trunk/calendar/inc/class.calendar_boupdate.inc.php

Modified: trunk/calendar/inc/class.calendar_boupdate.inc.php
URL: http://www.egroupware.org/viewvc/egroupware/trunk/calendar/inc/class.calendar_boupdate.inc.php?rev=28278&r1=28277&r2=28278&view=diff
==============================================================================
--- trunk/calendar/inc/class.calendar_boupdate.inc.php (original)
+++ trunk/calendar/inc/class.calendar_boupdate.inc.php Sat Nov  7 13:09:12 2009
@@ -412,6 +412,7 @@
  */
  function send_update($msg_type,$to_notify,$old_event,$new_event=null,$user=0)
  {
+ //echo "<p>".__METHOD__."($msg_type,".array2string($to_notify).",,$new_event[title],$user)</p>\n";
  if (!is_array($to_notify))
  {
  $to_notify = array();
@@ -438,7 +439,7 @@
  }
  if ($GLOBALS['egw']->preferences->account_id != $user)
  {
- $GLOBALS['egw']->preferences->preferences($user);
+ $GLOBALS['egw']->preferences->__construct($user);
  $GLOBALS['egw_info']['user']['preferences'] = $GLOBALS['egw']->preferences->read_repository();
  }
  $senderid = $GLOBALS['egw_info']['user']['account_id'];
@@ -612,10 +613,14 @@
  }
  }
  }
- // restore the enviroment
+ // restore the enviroment (preferences->read_repository() sets the timezone!)
  $GLOBALS['egw_info']['user'] = $temp_user;
- $GLOBALS['egw']->datetime->tz_offset = 3600 * $GLOBALS['egw_info']['user']['preferences']['common']['tz_offset'];
-
+ if ($GLOBALS['egw']->preferences->account_id != $temp_user['account_id'] || isset($preferences))
+ {
+ $GLOBALS['egw']->preferences->__construct($temp_user['account_id']);
+ $GLOBALS['egw_info']['user']['preferences'] = $GLOBALS['egw']->preferences->read_repository();
+ //echo "<p>".__METHOD__."() restored enviroment of #$temp_user[account_id] $temp_user[account_fullname]: tz={$GLOBALS['egw_info']['user']['preferences']['common']['tz']}</p>\n";
+ }
  return true;
  }
 


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
eGroupWare-cvs mailing list
eGroupWare-cvs@...
https://lists.sourceforge.net/lists/listinfo/egroupware-cvs