diff options
author | Frederic Guillot <fred@kanboard.net> | 2015-05-16 21:04:46 -0400 |
---|---|---|
committer | Frederic Guillot <fred@kanboard.net> | 2015-05-16 21:04:46 -0400 |
commit | e94a2f6a00b59a6e2b63d461794b01a2b9d07473 (patch) | |
tree | 4e097bcad8f070515dcf9a0edf1af5acef0305aa /app/Schema/Sqlite.php | |
parent | b028b3586c5022753e9ff390a042aac9f5b863f4 (diff) |
Display tasks in the calendar + improve settings
Diffstat (limited to 'app/Schema/Sqlite.php')
-rw-r--r-- | app/Schema/Sqlite.php | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/app/Schema/Sqlite.php b/app/Schema/Sqlite.php index 830fd916..7af7bbe8 100644 --- a/app/Schema/Sqlite.php +++ b/app/Schema/Sqlite.php @@ -6,7 +6,22 @@ use Core\Security; use PDO; use Model\Link; -const VERSION = 67; +const VERSION = 68; + +function version_68($pdo) +{ + $rq = $pdo->prepare("SELECT value FROM settings WHERE option='subtask_forecast'"); + $rq->execute(); + $result = $rq->fetch(PDO::FETCH_ASSOC); + + $rq = $pdo->prepare('INSERT INTO settings VALUES (?, ?)'); + $rq->execute(array('calendar_user_subtasks_forecast', isset($result['subtask_forecast']) && $result['subtask_forecast'] == 1 ? 1 : 0)); + $rq->execute(array('calendar_user_subtasks_time_tracking', 0)); + $rq->execute(array('calendar_user_tasks', 'date_started')); + $rq->execute(array('calendar_project_tasks', 'date_started')); + + $pdo->exec("DELETE FROM settings WHERE option='subtask_forecast'"); +} function version_67($pdo) { |