-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetup.php
More file actions
41 lines (30 loc) · 1.24 KB
/
setup.php
File metadata and controls
41 lines (30 loc) · 1.24 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
<?php
//if(php_sapi_name() != 'cli') exit();
require_once 'classes/Project.php';
require_once 'classes/Notification.php';
// -----------------------------------------------------------------------------
// Add all teams to the database
// -----------------------------------------------------------------------------
$all_teams = all_teams();
foreach ($all_teams as $name => $team) {
$teamobj = new Team($team);
$teamobj->getTeam()->add();
}
// -----------------------------------------------------------------------------
// Add all tasks to the database
// -----------------------------------------------------------------------------
$all_tasks = all_tasks();
foreach ($all_tasks as $name => $task_group) {
foreach ($task_group as $task) {
$taskobj = new Task($task);
$taskobj->getTask()->add();
}
}
// -----------------------------------------------------------------------------
// Add all notifications to the database
// -----------------------------------------------------------------------------
$all_notifications = all_notifications();
foreach ($all_notifications as $notification_id => $notification_name) {
$notificationobj = new Notification($notification_id, $notification_name);
$notificationobj->add();
}