From 4d9b923bd817d0df8022054b85016911dedba035 Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Sat, 3 Feb 2018 17:56:59 +0000 Subject: [PATCH] Fixed a persistence problem for week view plugin options. --- WEB-INF/templates/footer.tpl | 2 +- profile_edit.php | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 8799451c..5a86537a 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.17.11.3872 | Copyright © Anuko | +  Anuko Time Tracker 1.17.12.3873 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/profile_edit.php b/profile_edit.php index 1d12bae4..5839c7e0 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -266,6 +266,16 @@ if ($request->isPost()) { $plugins .= ',mq'; if ($cl_week_view) $plugins .= ',wv'; + + // Recycle week view plugin options as they are not configured on this page. + $existing_plugins = explode(',', $user->plugins); + if (in_array('wvn', $existing_plugins)) + $plugins .= ',wvn'; + if (in_array('wvl', $existing_plugins)) + $plugins .= ',wvl'; + if (in_array('wvns', $existing_plugins)) + $plugins .= ',wvns'; + $plugins = trim($plugins, ','); $update_result = ttTeamHelper::update($user->team_id, array( -- 2.20.1