From 92aa6929dec928a37597716d951e013814c61c04 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 19 Sep 2018 17:03:13 +0200 Subject: [PATCH] Fix go back on agenda view on correct page --- htdocs/comm/action/index.php | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index 7e27c0d924c7e..843f9e6e166b0 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -109,16 +109,15 @@ { $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'));