Fix go back on agenda view on correct page

This commit is contained in:
Laurent Destailleur 2018-09-19 17:03:13 +02:00
parent 12b449fe49
commit 92aa6929de

View File

@ -109,16 +109,15 @@ if ($action == 'default') // When action is default, we want a calendar view and
{
$action = (($defaultview != 'show_list') ? $defaultview : 'show_month');
}
if (GETPOST('viewcal') && $action != 'show_day' && $action != 'show_week') {
if (GETPOST('viewcal','none') && GETPOST('action','alpha') != 'show_day' && GETPOST('action','alpha') != 'show_week') {
$action='show_month'; $day='';
} // View by month
if (GETPOST('viewweek') || $action == 'show_week') {
} // View by month
if (GETPOST('viewweek','none') || GETPOST('action','alpha') == 'show_week') {
$action='show_week'; $week=($week?$week:date("W")); $day=($day?$day:date("d"));
} // View by week
if (GETPOST('viewday') || $action == 'show_day') {
} // View by week
if (GETPOST('viewday','none') || GETPOST('action','alpha') == 'show_day') {
$action='show_day'; $day=($day?$day:date("d"));
} // View by day
} // View by day
// Load translation files required by the page
$langs->loadLangs(array('agenda', 'other', 'commercial'));