More refactoring for subgroups.
authorNik Okuntseff <support@anuko.com>
Tue, 4 Dec 2018 21:49:24 +0000 (21:49 +0000)
committerNik Okuntseff <support@anuko.com>
Tue, 4 Dec 2018 21:49:24 +0000 (21:49 +0000)
WEB-INF/lib/form/DateField.class.php
WEB-INF/templates/footer.tpl
expense_edit.php

index 9016dff..f1487d0 100644 (file)
@@ -48,7 +48,7 @@ class DateField extends TextField {
     global $user;
     global $i18n;
        
-    $this->mDateObj->setFormat($user->date_format);
+    $this->mDateObj->setFormat($user->getDateFormat());
 
     $this->mMonthNames = $i18n->monthNames;
     $this->mWeekDayShortNames = $i18n->weekdayShortNames;
@@ -56,7 +56,7 @@ class DateField extends TextField {
     $this->lCalendarButtons['today'] = $i18n->get('label.today');
     $this->lCalendarButtons['close'] = $i18n->get('button.close');
 
-    $this->mDateFormat = $user->date_format;
+    $this->mDateFormat = $user->getDateFormat();
     $this->mWeekStartDay = $user->week_start;
   }
 
index 3af107e..1ed3fe6 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.18.29.4586 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.18.29.4587 | 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 c42bddc..667d034 100644 (file)
@@ -161,18 +161,17 @@ if ($request->isPost()) {
   // Validate user input.
   if ($user->isPluginEnabled('cl') && $user->isPluginEnabled('cm') && !$cl_client)
     $err->add($i18n->get('error.client'));
-  if (MODE_PROJECTS == $trackingMode || MODE_PROJECTS_AND_TASKS == $trackingMode) {
-    if (!$cl_project) $err->add($i18n->get('error.project'));
-  }
+  if ($show_project && !$cl_project)
+    $err->add($i18n->get('error.project'));
   if (!ttValidString($cl_item_name)) $err->add($i18n->get('error.field'), $i18n->get('label.item'));
   if (!ttValidFloat($cl_cost)) $err->add($i18n->get('error.field'), $i18n->get('label.cost'));
   if (!ttValidDate($cl_date)) $err->add($i18n->get('error.field'), $i18n->get('label.date'));
 
   // This is a new date for the expense item.
-  $new_date = new DateAndTime($user->date_format, $cl_date);
+  $new_date = new DateAndTime($user->getDateFormat(), $cl_date);
 
   // Prohibit creating entries in future.
-  if (!$user->future_entries) {
+  if (!$user->getConfigOption('future_entries')) {
     $browser_today = new DateAndTime(DB_DATEFORMAT, $request->getParameter('browser_today', null));
     if ($new_date->after($browser_today))
       $err->add($i18n->get('error.future_date'));