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'];
// 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;
}
@ -745,7 +745,7 @@ class calendar_boupdate extends calendar_bo
$startdate = new egw_time($event['start']);
$enddate = new egw_time($event['end']);
$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)
{
unset($res_info);
@ -762,7 +762,7 @@ class calendar_boupdate extends calendar_bo
// check if event-owner wants non-EGroupware users notified
if (is_null($owner_prefs))
{
$preferences = new preferences($old_event['owner']);
$preferences = new preferences($owner);
$owner_prefs = $preferences->read_repository();
}
if ($role != 'CHAIR' && // always notify externals CHAIRs
@ -797,7 +797,7 @@ class calendar_boupdate extends calendar_bo
{
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();
}
$part_prefs = $owner_prefs;

View File

@ -5,7 +5,7 @@
* @link http://www.egroupware.org
* @package calendar
* @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
* @version $Id$
*/
@ -247,14 +247,17 @@ class calendar_uilist extends calendar_ui
}
}
$old_params = egw_session::appsession('calendar_list','calendar');
if ($old_params['filter'] && $old_params['filter'] != $params['filter']) // filter changed => order accordingly
if (is_array($old_params))
{
$params['order'] = 'cal_start';
$params['sort'] = $params['filter'] == 'after' ? 'ASC' : 'DESC';
}
if ($old_params['search'] != $params['search'])
{
$this->adjust_for_search($params['search'],$params);
if ($old_params['filter'] && $old_params['filter'] != $params['filter']) // filter changed => order accordingly
{
$params['order'] = 'cal_start';
$params['sort'] = $params['filter'] == 'after' ? 'ASC' : 'DESC';
}
if ($old_params['search'] != $params['search'])
{
$this->adjust_for_search($params['search'],$params);
}
}
if (!$params['csv_export']) egw_session::appsession('calendar_list','calendar',$params);