Removed not used team address field handling.
authorNik Okuntseff <support@anuko.com>
Fri, 19 Jan 2018 14:41:34 +0000 (14:41 +0000)
committerNik Okuntseff <support@anuko.com>
Fri, 19 Jan 2018 14:41:34 +0000 (14:41 +0000)
WEB-INF/lib/ttTeamHelper.class.php
WEB-INF/lib/ttUser.class.php
WEB-INF/templates/footer.tpl
profile_edit.php

index 69fcaa0..0f3358f 100644 (file)
@@ -750,9 +750,8 @@ class ttTeamHelper {
       $workday_hours_v = '';
     }
 
-    $sql = "insert into tt_teams (name, address, currency $lockspec_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $task_required_f $record_type_f $uncompleted_indicators_f $workday_hours_f)
+    $sql = "insert into tt_teams (name, currency $lockspec_f, lang $decimal_mark_f $date_format_f $time_format_f $week_start_f $plugins_f $tracking_mode_f $task_required_f $record_type_f $uncompleted_indicators_f $workday_hours_f)
       values(".$mdb2->quote(trim($fields['name'])).
-      ", ".$mdb2->quote(trim($fields['address'])).
       ", ".$mdb2->quote(trim($fields['currency']))." $lockspec_v, ".$mdb2->quote($lang).
       "$decimal_mark_v $date_format_v $time_format_v $week_start_v $plugins_v $tracking_mode_v $task_required_v $record_type_v $uncompleted_indicators_v $workday_hours_v)";
     $affected = $mdb2->exec($sql);
@@ -771,7 +770,6 @@ class ttTeamHelper {
     $mdb2 = getConnection();
     $name_part = 'name = '.$mdb2->quote($fields['name']);
     $currency_part = '';
-    $addr_part = '';
     $lang_part = '';
     $decimal_mark_part = '';
     $date_format_part = '';
@@ -786,7 +784,6 @@ class ttTeamHelper {
     $lock_spec_part = '';
     $workday_hours_part = '';
 
-    if (isset($fields['address'])) $addr_part = ', address = '.$mdb2->quote($fields['address']);
     if (isset($fields['currency'])) $currency_part = ', currency = '.$mdb2->quote($fields['currency']);
     if (isset($fields['lang'])) $lang_part = ', lang = '.$mdb2->quote($fields['lang']);
     if (isset($fields['decimal_mark'])) $decimal_mark_part = ', decimal_mark = '.$mdb2->quote($fields['decimal_mark']);
@@ -801,7 +798,7 @@ class ttTeamHelper {
     if (isset($fields['lock_spec'])) $lock_spec_part = ', lock_spec = '.$mdb2->quote($fields['lock_spec']);
     if (isset($fields['workday_hours'])) $workday_hours_part = ', workday_hours = '.$mdb2->quote($fields['workday_hours']);
 
-    $sql = "update tt_teams set $name_part $addr_part $currency_part $lang_part $decimal_mark_part
+    $sql = "update tt_teams set $name_part $currency_part $lang_part $decimal_mark_part
       $date_format_part $time_format_part $week_start_part $tracking_mode_part $task_required_part $record_type_part
       $uncompleted_indicators_part $bcc_email_part $plugins_part $lock_spec_part $workday_hours_part where id = $team_id";
     $affected = $mdb2->exec($sql);
index 20efe25..565e47a 100644 (file)
@@ -51,7 +51,6 @@ class ttUser {
   var $plugins = null;          // Comma-separated list of enabled plugins.
   var $team = null;             // Team name.
   var $custom_logo = 0;         // Whether to use a custom logo for team.
-  var $address = null;          // Address for invoices.
   var $lock_spec = null;        // Cron specification for record locking.
   var $workday_hours = 8;       // Number of work hours in a regular day.
   var $rights = 0;              // A mask of user rights.
@@ -66,7 +65,7 @@ class ttUser {
     $mdb2 = getConnection();
 
     $sql = "SELECT u.id, u.login, u.name, u.team_id, u.role, u.client_id, u.email, t.name as team_name, 
-      t.address, t.currency, t.lang, t.decimal_mark, t.date_format, t.time_format, t.week_start,
+      t.currency, t.lang, t.decimal_mark, t.date_format, t.time_format, t.week_start,
       t.tracking_mode, t.project_required, t.task_required, t.record_type, t.uncompleted_indicators,
       t.bcc_email, t.plugins, t.lock_spec, t.workday_hours, t.custom_logo
       FROM tt_users u LEFT JOIN tt_teams t ON (u.team_id = t.id) WHERE ";
@@ -102,7 +101,6 @@ class ttUser {
       $this->uncompleted_indicators = $val['uncompleted_indicators'];
       $this->bcc_email = $val['bcc_email'];
       $this->team = $val['team_name'];
-      $this->address = $val['address'];
       $this->currency = $val['currency'];
       $this->plugins = $val['plugins'];
       $this->lock_spec = $val['lock_spec'];
index ea522fa..400209c 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.14.0.3756 | Copyright &copy; <a href="https://www.anuko.com/lp/tt_3.htm" target="_blank">Anuko</a> |
+          <td align="center">&nbsp;Anuko Time Tracker 1.14.0.3757 | 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 d85c1dc..ce20f4a 100644 (file)
@@ -50,7 +50,6 @@ if ($request->isPost()) {
 
   if ($user->canManageTeam()) {
     $cl_team = trim($request->getParameter('team_name'));
-    $cl_address = trim($request->getParameter('address'));
     $cl_currency = trim($request->getParameter('currency'));
     if (!$cl_currency) $cl_currency = CURRENCY_DEFAULT;
     $cl_lang = $request->getParameter('lang');
@@ -82,7 +81,6 @@ if ($request->isPost()) {
   $cl_email = $user->email;
   if ($user->canManageTeam()) {
     $cl_team = $user->team;
-    $cl_address = $user->address;
     $cl_currency = ($user->currency == ''? CURRENCY_DEFAULT : $user->currency);
     $cl_lang = $user->lang;
     $cl_decimal_mark = $user->decimal_mark;
@@ -224,7 +222,6 @@ if ($request->isPost()) {
   if (!ttValidEmail($cl_email, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.email'));
   if ($user->canManageTeam()) {
     if (!ttValidString($cl_team, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.team_name'));
-    if (!ttValidString($cl_address, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.address'));
     if (!ttValidString($cl_currency, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.currency'));
     if ($user->isManager()) {
       if (!ttValidEmail($cl_bcc_email, true)) $err->add($i18n->getKey('error.field'), $i18n->getKey('label.bcc'));
@@ -263,7 +260,6 @@ if ($request->isPost()) {
 
       $update_result = ttTeamHelper::update($user->team_id, array(
         'name' => $cl_team,
-        'address' => $cl_address,
         'currency' => $cl_currency,
         'lang' => $cl_lang,
         'decimal_mark' => $cl_decimal_mark,