Remove no longer used preference for preselected group entering the planner

This commit is contained in:
Nathan Gray 2015-12-17 00:02:38 +00:00
parent 967bfc2bdd
commit 0e50aaee77
5 changed files with 2 additions and 38 deletions

View File

@ -1965,10 +1965,6 @@ class calendar_bo
$default_prefs =& $GLOBALS['egw']->preferences->default['calendar'];
$forced_prefs =& $GLOBALS['egw']->preferences->forced['calendar'];
if (!($planner_start_with_group = $GLOBALS['egw']->accounts->name2id('Default')))
{
$planner_start_with_group = '0';
}
$subject = lang('Calendar Event') . ' - $$action$$: $$startdate$$ $$title$$'."\n";
$values = array(
'notifyAdded' => $subject . lang ('You have a meeting scheduled for %1','$$startdate$$'),
@ -1977,7 +1973,6 @@ class calendar_bo
'notifyDisinvited'=> $subject . lang ('You have been disinvited from the meeting at %1','$$startdate$$'),
'notifyResponse' => $subject . lang ('On %1 %2 %3 your meeting request for %4','$$date$$','$$fullname$$','$$action$$','$$startdate$$'),
'notifyAlarm' => lang('Alarm for %1 at %2 in %3','$$title$$','$$startdate$$','$$location$$')."\n".lang ('Here is your requested alarm.'),
'planner_start_with_group' => $planner_start_with_group,
'interval' => 30,
);
foreach($values as $var => $default)

View File

@ -307,15 +307,6 @@ class calendar_hooks
'xmlrpc' => True,
'admin' => False
),
'planner_start_with_group' => array(
'type' => 'select',
'label' => 'Preselected group for entering the planner',
'name' => 'planner_start_with_group',
'values' => $options,
'help' => 'This group that is preselected when you enter the planner. You can change it in the planner anytime you want.',
'xmlrpc' => True,
'admin' => False,
),
'planner_show_empty_rows' => array(
'type' => 'select',
'label' => 'Show empty rows in Planner',

View File

@ -391,26 +391,6 @@ class calendar_ui
}
if ($class == 'calendar_uiviews' || $class == 'calendar_uilist')
{
// if planner_start_with_group is set in the users prefs: switch owner for planner to planner_start_with_group and back
if ($this->cal_prefs['planner_start_with_group'])
{
if ($this->cal_prefs['planner_start_with_group'] > 0) $this->cal_prefs['planner_start_with_group'] *= -1; // fix old 1.0 pref
if (!$states_session && !$_GET['menuaction']) $this->view = ''; // first call to calendar
if ($func == 'planner' && $this->view != 'planner' && $this->owner == $this->user)
{
//echo "<p>switched for planner to {$this->cal_prefs['planner_start_with_group']}, view was $this->view, func=$func, owner was $this->owner</p>\n";
$states['save_owner'] = $this->save_owner = $this->owner;
$states['owner'] = $this->owner = $this->cal_prefs['planner_start_with_group'];
}
elseif ($func != 'planner' && $this->view == 'planner' && $this->owner == $this->cal_prefs['planner_start_with_group'] && $this->save_owner)
{
//echo "<p>switched back to $this->save_owner, view was $this->view, func=$func, owner was $this->owner</p>\n";
$states['owner'] = $this->owner = $this->save_owner;
$states['save_owner'] = $this->save_owner = 0;
}
}
$this->view = $states['view'] = $func;
}
$this->view_menuaction = $this->view == 'listview' ? 'calendar.calendar_uilist.listview' : 'calendar.calendar_uiviews.index';

View File

@ -85,8 +85,7 @@ class calendar_uiforms extends calendar_ui
{
$owner = $_GET['owner'];
}
// dont set the planner start group as owner/participants if called from planner
elseif ($this->view != 'planner' || $this->owner != $this->cal_prefs['planner_start_with_group'])
else
{
$owner = $this->owner;
}

View File

@ -282,8 +282,7 @@ class calendar_uiviews extends calendar_ui
'date' => $this->bo->date2string($this->bo->now_su),
'cat_id' => 0,
'filter' => 'default',
'owner' => substr($this->cal_prefs['mainscreen_showevents'],0,7) == 'planner' && $this->cal_prefs['planner_start_with_group'] ?
$this->cal_prefs['planner_start_with_group'] : $this->user,
'owner' => $this->user,
'multiple' => 0,
'view' => $this->bo->cal_prefs['mainscreen_showevents'],
));