Refactoring: renamed a few variables for consistency.
authorNik Okuntseff <support@anuko.com>
Thu, 21 Jul 2016 21:47:05 +0000 (21:47 +0000)
committerNik Okuntseff <support@anuko.com>
Thu, 21 Jul 2016 21:47:05 +0000 (21:47 +0000)
WEB-INF/templates/footer.tpl
WEB-INF/templates/time.tpl
time.php

index c058494..118f66c 100644 (file)
@@ -12,7 +12,7 @@
       <br>
       <table cellspacing="0" cellpadding="4" width="100%" border="0">
         <tr>
-          <td align="center">&nbsp;Anuko Time Tracker 1.9.27.3510 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.9.27.3511 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
             <a href="https://www.anuko.com/lp/tt_4.htm" target="_blank">{$i18n.footer.credits}</a> |
             <a href="https://www.anuko.com/lp/tt_5.htm" target="_blank">{$i18n.footer.license}</a> |
             <a href="https://www.anuko.com/lp/tt_7.htm" target="_blank">{$i18n.footer.improve}</a>
index a4f4af6..6285628 100644 (file)
@@ -358,9 +358,9 @@ function get_time() {
   <tr>
     <td align="left">{$i18n.label.month_total}: {$month_total}</td>
     {if $over_quota}
-    <td align="right">{$i18n.form.time.over_quota}: <span style="color: green;">{$month_left}</span></td>
+    <td align="right">{$i18n.form.time.over_quota}: <span style="color: green;">{$quota_remaining}</span></td>
     {else}
-    <td align="right">{$i18n.form.time.remaining_quota}: <span style="color: red;">{$month_left}</span></td>
+    <td align="right">{$i18n.form.time.remaining_quota}: <span style="color: red;">{$quota_remaining}</span></td>
     {/if}
   </tr>
   {/if}
index 63290a6..3543cce 100644 (file)
--- 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.