From ff71ab051012b2ac0664f08603b8c6455feba5db Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Thu, 21 Jul 2016 21:47:05 +0000 Subject: [PATCH] Refactoring: renamed a few variables for consistency. --- WEB-INF/templates/footer.tpl | 2 +- WEB-INF/templates/time.tpl | 4 ++-- time.php | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index c0584944..118f66cd 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
- {if $over_quota} - + {else} - + {/if} {/if} diff --git a/time.php b/time.php index 63290a69..3543cce0 100644 --- a/time.php +++ b/time.php @@ -66,13 +66,13 @@ if ($user->isPluginEnabled('cf')) { if ($user->isPluginEnabled('mq')){ require_once('plugins/MonthlyQuota.class.php'); $quota = new MonthlyQuota(); - $monthlyQuota = $quota->get($selected_date->mYear, $selected_date->mMonth); + $month_quota = $quota->get($selected_date->mYear, $selected_date->mMonth); $month_total = ttTimeHelper::getTimeForMonth($user->getActiveUser(), $selected_date); - $minutesLeft = ttTimeHelper::toMinutes($monthlyQuota) - ttTimeHelper::toMinutes($month_total); + $minutes_left = ttTimeHelper::toMinutes($month_quota) - ttTimeHelper::toMinutes($month_total); $smarty->assign('month_total', $month_total); - $smarty->assign('over_quota', $minutesLeft < 0); - $smarty->assign('month_left', ttTimeHelper::toAbsDuration($minutesLeft)); + $smarty->assign('over_quota', $minutes_left < 0); + $smarty->assign('quota_remaining', ttTimeHelper::toAbsDuration($minutes_left)); } // Initialize variables. -- 2.20.1
 Anuko Time Tracker 1.9.27.3510 | Copyright © Anuko | +  Anuko Time Tracker 1.9.27.3511 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/WEB-INF/templates/time.tpl b/WEB-INF/templates/time.tpl index a4f4af6d..6285628f 100644 --- a/WEB-INF/templates/time.tpl +++ b/WEB-INF/templates/time.tpl @@ -358,9 +358,9 @@ function get_time() {
{$i18n.label.month_total}: {$month_total}{$i18n.form.time.over_quota}: {$month_left}{$i18n.form.time.over_quota}: {$quota_remaining}{$i18n.form.time.remaining_quota}: {$month_left}{$i18n.form.time.remaining_quota}: {$quota_remaining}