From e732e1dd5c8a5cfaa24f5690ede39be2a90d0e3d Mon Sep 17 00:00:00 2001 From: Nik Okuntseff Date: Fri, 19 Jan 2018 14:41:34 +0000 Subject: [PATCH] Removed not used team address field handling. --- WEB-INF/lib/ttTeamHelper.class.php | 7 ++----- WEB-INF/lib/ttUser.class.php | 4 +--- WEB-INF/templates/footer.tpl | 2 +- profile_edit.php | 4 ---- 4 files changed, 4 insertions(+), 13 deletions(-) diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 69fcaa0f..0f3358f6 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -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); diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 20efe259..565e47ad 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -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']; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index ea522fa3..400209c3 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.14.0.3756 | Copyright © Anuko | +  Anuko Time Tracker 1.14.0.3757 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/profile_edit.php b/profile_edit.php index d85c1dcc..ce20f4a5 100644 --- a/profile_edit.php +++ b/profile_edit.php @@ -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, -- 2.20.1