fixed some more "Illegal string offset"

This commit is contained in:
Ralf Becker 2012-08-14 07:55:05 +00:00
parent 25ddf016f4
commit 4ac5e799eb
2 changed files with 15 additions and 12 deletions

View File

@ -640,7 +640,7 @@ class calendar_boupdate extends calendar_bo
$version = $GLOBALS['egw_info']['apps']['calendar']['version']; $version = $GLOBALS['egw_info']['apps']['calendar']['version'];
// ignore events in the past (give a tolerance of 10 seconds for the script) // ignore events in the past (give a tolerance of 10 seconds for the script)
if($old_event != False && $this->date2ts($old_event['start']) < ($this->now_su - 10)) if($old_event && $this->date2ts($old_event['start']) < ($this->now_su - 10))
{ {
return False; return False;
} }
@ -745,7 +745,7 @@ class calendar_boupdate extends calendar_bo
$startdate = new egw_time($event['start']); $startdate = new egw_time($event['start']);
$enddate = new egw_time($event['end']); $enddate = new egw_time($event['end']);
$modified = new egw_time($event['modified']); $modified = new egw_time($event['modified']);
if ($old_event != False) $olddate = new egw_time($old_event['start']); if ($old_event) $olddate = new egw_time($old_event['start']);
foreach($to_notify as $userid => $statusid) foreach($to_notify as $userid => $statusid)
{ {
unset($res_info); unset($res_info);
@ -762,7 +762,7 @@ class calendar_boupdate extends calendar_bo
// check if event-owner wants non-EGroupware users notified // check if event-owner wants non-EGroupware users notified
if (is_null($owner_prefs)) if (is_null($owner_prefs))
{ {
$preferences = new preferences($old_event['owner']); $preferences = new preferences($owner);
$owner_prefs = $preferences->read_repository(); $owner_prefs = $preferences->read_repository();
} }
if ($role != 'CHAIR' && // always notify externals CHAIRs if ($role != 'CHAIR' && // always notify externals CHAIRs
@ -797,7 +797,7 @@ class calendar_boupdate extends calendar_bo
{ {
if (is_null($owner_prefs)) if (is_null($owner_prefs))
{ {
$preferences = new preferences($old_event['owner']); $preferences = new preferences($owner);
$GLOBALS['egw_info']['user']['preferences'] = $owner_prefs = $preferences->read_repository(); $GLOBALS['egw_info']['user']['preferences'] = $owner_prefs = $preferences->read_repository();
} }
$part_prefs = $owner_prefs; $part_prefs = $owner_prefs;

View File

@ -5,7 +5,7 @@
* @link http://www.egroupware.org * @link http://www.egroupware.org
* @package calendar * @package calendar
* @author Ralf Becker <RalfBecker-AT-outdoor-training.de> * @author Ralf Becker <RalfBecker-AT-outdoor-training.de>
* @copyright (c) 2005-11 by RalfBecker-At-outdoor-training.de * @copyright (c) 2005-12 by RalfBecker-At-outdoor-training.de
* @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License * @license http://opensource.org/licenses/gpl-license.php GPL - GNU General Public License
* @version $Id$ * @version $Id$
*/ */
@ -247,6 +247,8 @@ class calendar_uilist extends calendar_ui
} }
} }
$old_params = egw_session::appsession('calendar_list','calendar'); $old_params = egw_session::appsession('calendar_list','calendar');
if (is_array($old_params))
{
if ($old_params['filter'] && $old_params['filter'] != $params['filter']) // filter changed => order accordingly if ($old_params['filter'] && $old_params['filter'] != $params['filter']) // filter changed => order accordingly
{ {
$params['order'] = 'cal_start'; $params['order'] = 'cal_start';
@ -256,6 +258,7 @@ class calendar_uilist extends calendar_ui
{ {
$this->adjust_for_search($params['search'],$params); $this->adjust_for_search($params['search'],$params);
} }
}
if (!$params['csv_export']) egw_session::appsession('calendar_list','calendar',$params); if (!$params['csv_export']) egw_session::appsession('calendar_list','calendar',$params);
// do we need to query custom fields and which // do we need to query custom fields and which