From 5f3f3b3e55c942d349dae2b33599eb9bcfe6ed75 Mon Sep 17 00:00:00 2001 From: Nathan Gray Date: Thu, 12 Mar 2015 15:23:15 +0000 Subject: [PATCH] Respect "Default type of resources selection" preference --- calendar/inc/class.calendar_uiforms.inc.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/calendar/inc/class.calendar_uiforms.inc.php b/calendar/inc/class.calendar_uiforms.inc.php index 9914d39ab0..cfdb3926b2 100644 --- a/calendar/inc/class.calendar_uiforms.inc.php +++ b/calendar/inc/class.calendar_uiforms.inc.php @@ -1466,21 +1466,21 @@ class calendar_uiforms extends calendar_ui } // adding extra content for the resource link-entry widget to // * select resources or addressbook as a default selection on the app selectbox based on prefs - $content['participants']['resource']['default_sel'] = $this->cal_prefs['defaultresource_sel']; + $content['participants']['resource']['app'] = $this->cal_prefs['defaultresource_sel']; // * get informations from the event on the ajax callback - if (in_array($content['participants']['resource']['default_sel'],array('resources_conflict','resources_without_conflict'))) + if (in_array($content['participants']['resource']['app'],array('resources_conflict','resources_without_conflict'))) { // fix real app string - $content['participants']['resource']['default_sel'] = 'resources'; + $content['participants']['resource']['app'] = 'resources'; // this will be used to get reservation information on the resource select list $content['participants']['resource']['extra'] = "values2url(this.form,'start,end,duration,participants,recur_type,whole_day')". "+'&exec[event_id]=".$content['id']."'"."+'&exec[show_conflict]=". (($this->cal_prefs['defaultresource_sel'] == 'resources_without_conflict')? '0':'1')."'"; } // check if current pref. is an allowed application for the user - if (!isset($GLOBALS['egw_info']['user']['apps'][$content['participants']['resource']['default_sel']])) + if (!isset($GLOBALS['egw_info']['user']['apps'][$content['participants']['resource']['app']])) { - $content['participants']['resource']['default_sel'] = 'home-accounts'; + $content['participants']['resource']['app'] = 'home-accounts'; } } $content['participants']['status_date'] = $preserv['actual_date'];