refactor: Added general config validations and timezone config

This commit is contained in:
Aerex
2020-06-03 00:04:43 -05:00
parent 00d0ea624f
commit c2e181aa75
7 changed files with 69 additions and 51 deletions

View File

@@ -26,9 +26,9 @@ class Taskwarrior implements IStorage {
public function refresh() {
$output = $this->console->execute('task', ['sync'], null,
['TASKRC' => $this->configs['taskrc'],'TASKDATA' => $this->configs['taskdata']]);
$tasks = json_decode($this->console->execute('task', ['export'], null,
$this->tasks = json_decode($this->console->execute('task', ['export'], null,
['TASKRC' => $this->configs['taskrc'], 'TASKDATA' => $this->configs['taskdata']]), true);
foreach ($tasks as $task) {
foreach ($this->tasks as $task) {
if (isset($task['uid'])) {
$this->tasks[$task['uid']] = $task;
}