From 023f77bd20e78062786027bc66280b60e64dfb79 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Wed, 11 Mar 2015 23:26:21 +0000 Subject: [PATCH] Fix some calendar portlets changing user when you change calendar app's user. --- calendar/inc/class.calendar_favorite_portlet.inc.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/calendar/inc/class.calendar_favorite_portlet.inc.php b/calendar/inc/class.calendar_favorite_portlet.inc.php index 3d91a6674b..406310225a 100644 --- a/calendar/inc/class.calendar_favorite_portlet.inc.php +++ b/calendar/inc/class.calendar_favorite_portlet.inc.php @@ -66,7 +66,8 @@ class calendar_favorite_portlet extends home_favorite_portlet $ui = new calendar_uiviews(); if($this->favorite['state']['start']) $ui->search_params['start'] = $this->favorite['state']['start']; if($this->favorite['state']['cat_id']) $ui->search_params['cat_id'] = $this->favorite['state']['cat_id']; - if($this->favorite['state']['owner']) $ui->search_params['users'] = explode(',',$this->favorite['state']['owner']); + // Owner can be 0 for current user + if(array_key_exists('owner',$this->favorite['state'])) $ui->search_params['users'] = explode(',',$this->favorite['state']['owner']); if($this->favorite['state']['filter']) $ui->search_params['filter'] = $this->favorite['state']['filter']; if($this->favorite['state']['sortby']) $ui->search_params['sortby'] = $this->favorite['state']['sortby'];