From 46721cbd0895d4aa40df4ee13f2f0dede1d6a6a4 Mon Sep 17 00:00:00 2001 From: anuko Date: Sun, 7 May 2017 13:52:56 +0000 Subject: [PATCH] Changed the default value of task_required field to 0 for consistency. --- WEB-INF/lib/ttTeamHelper.class.php | 2 +- WEB-INF/lib/ttUser.class.php | 2 +- WEB-INF/templates/footer.tpl | 2 +- dbinstall.php | 2 +- mysql.sql | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/WEB-INF/lib/ttTeamHelper.class.php b/WEB-INF/lib/ttTeamHelper.class.php index 3804b527..e4e3b175 100644 --- a/WEB-INF/lib/ttTeamHelper.class.php +++ b/WEB-INF/lib/ttTeamHelper.class.php @@ -773,7 +773,7 @@ class ttTeamHelper { $time_format_part = ''; $week_start_part = ''; $tracking_mode_part = ''; - $task_required_part = ' , task_required = '.$mdb2->quote($fields['task_required']); + $task_required_part = ' , task_required = '.intval($fields['task_required']); $record_type_part = ''; $uncompleted_indicators_part = ''; $plugins_part = ''; diff --git a/WEB-INF/lib/ttUser.class.php b/WEB-INF/lib/ttUser.class.php index 44c48629..3f160ff9 100644 --- a/WEB-INF/lib/ttUser.class.php +++ b/WEB-INF/lib/ttUser.class.php @@ -93,7 +93,7 @@ class ttUser { $this->time_format = $val['time_format']; $this->week_start = $val['week_start']; $this->tracking_mode = $val['tracking_mode']; - $this->task_required = intval($val['task_required']); + $this->task_required = $val['task_required']; $this->record_type = $val['record_type']; $this->uncompleted_indicators = $val['uncompleted_indicators']; $this->team = $val['team_name']; diff --git a/WEB-INF/templates/footer.tpl b/WEB-INF/templates/footer.tpl index 5e41dbcd..a6154ec8 100644 --- a/WEB-INF/templates/footer.tpl +++ b/WEB-INF/templates/footer.tpl @@ -12,7 +12,7 @@
-
 Anuko Time Tracker 1.11.44.3633 | Copyright © Anuko | +  Anuko Time Tracker 1.11.44.3634 | Copyright © Anuko | {$i18n.footer.credits} | {$i18n.footer.license} | {$i18n.footer.improve} diff --git a/dbinstall.php b/dbinstall.php index e0f5b56b..b5bff5e8 100755 --- a/dbinstall.php +++ b/dbinstall.php @@ -636,7 +636,7 @@ if ($_POST) { setChange("ALTER TABLE tt_expense_items modify `name` text NOT NULL"); setChange("ALTER TABLE `tt_teams` ADD `uncompleted_indicators` SMALLINT(2) NOT NULL DEFAULT '0' AFTER `record_type`"); setChange("CREATE TABLE `tt_predefined_expenses` (`id` int(11) NOT NULL auto_increment, `team_id` int(11) NOT NULL, `name` varchar(255) NOT NULL, `cost` decimal(10,2) default '0.00', PRIMARY KEY (`id`))"); - setChange("ALTER TABLE `tt_teams` ADD `task_required` smallint(2) default NULL AFTER `tracking_mode`"); + setChange("ALTER TABLE `tt_teams` ADD `task_required` smallint(2) NOT NULL DEFAULT '0' AFTER `tracking_mode`"); } // The update_clients function updates projects field in tt_clients table. diff --git a/mysql.sql b/mysql.sql index 9e672686..54bd90d3 100644 --- a/mysql.sql +++ b/mysql.sql @@ -24,7 +24,7 @@ CREATE TABLE `tt_teams` ( `time_format` varchar(20) NOT NULL default '%H:%M', # time format `week_start` smallint(2) NOT NULL DEFAULT '0', # Week start day, 0 == Sunday. `tracking_mode` smallint(2) NOT NULL DEFAULT '1', # tracking mode ("time", "projects" or "projects and tasks") - `task_required` smallint(2) default NULL, # whether a task selection is required or optional + `task_required` smallint(2) NOT NULL DEFAULT '0', # whether a task selection is required or optional `record_type` smallint(2) NOT NULL DEFAULT '0', # time record type ("start and finish", "duration", or both) `uncompleted_indicators` smallint(2) NOT NULL DEFAULT '0', # whether to show indicators for users with uncompleted time entries `plugins` varchar(255) default NULL, # a list of enabled plugins for team -- 2.20.1