forked from projectsend/projectsend
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbootstrap.php
106 lines (76 loc) · 2.91 KB
/
bootstrap.php
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
<?php
/**
* Requirements of basic system files.
*/
define('ROOT_DIR', dirname(__FILE__));
define('DS', DIRECTORY_SEPARATOR);
define('CONFIG_FILE_NAME', '/includes/sys.config.php');
define('CONFIG_FILE', ROOT_DIR.CONFIG_FILE_NAME);
// Composer autoload
require_once ROOT_DIR . '/vendor/autoload.php';
// Basic system constants
require_once ROOT_DIR . '/includes/app.php';
// Load the database class
require_once ROOT_DIR . '/includes/database.php';
// Flash messages
require_once ROOT_DIR . '/includes/flash.php';
// Load the site options
if (!defined('IS_MAKE_CONFIG')) {
require_once ROOT_DIR . '/includes/site.options.php';
}
//if (defined('IS_MAKE_CONFIG') || defined('IS_INSTALL')) {
require_once ROOT_DIR . '/includes/install.constants.php';
//}
// Load the language class and translation file
require_once ROOT_DIR . '/includes/language.php';
require_once ROOT_DIR . '/includes/functions.i18n.php';
// Text strings used on various files
require_once ROOT_DIR . '/includes/text.strings.php';
// Basic functions to be accessed from anywhere
require_once ROOT_DIR . '/includes/functions.php';
// Assets
require_once ROOT_DIR . '/includes/functions.assets.php';
// Options functions
require_once ROOT_DIR . '/includes/functions.options.php';
// Require the updates functions
require_once ROOT_DIR . '/includes/updates.functions.php';
// Contains the session and cookies validation functions
require_once ROOT_DIR . '/includes/functions.session.permissions.php';
// Template list functions
require_once ROOT_DIR . '/includes/functions.templates.php';
// User Meta functions
require_once ROOT_DIR . '/includes/functions.usermeta.php';
// Contains the current session information
if (!defined('IS_INSTALL')) {
require_once ROOT_DIR . '/includes/active.session.php';
}
// Recreate the function if it doesn't exist. By Alan Reiblein
require_once ROOT_DIR . '/includes/timezone_identifiers_list.php';
// Action log functions
require_once ROOT_DIR . '/includes/functions.actionslog.php';
// Categories functions
require_once ROOT_DIR . '/includes/functions.categories.php';
// Search, filters and actions forms
require_once ROOT_DIR . '/includes/functions.forms.php';
// Search, filters and actions forms
require_once ROOT_DIR . '/includes/functions.groups.php';
// Public files display functins
require_once ROOT_DIR . '/includes/functions.public.php';
// Social login
if (!defined('IS_INSTALL')) {
require_once ROOT_DIR . '/includes/hybridauth.php';
}
// Security
require_once ROOT_DIR . '/includes/security/csrf.php';
if (!defined('IS_ERROR_PAGE')) {
check_server_requirements();
}
global $bfchecker;
$bfchecker = new \ProjectSend\Classes\BruteForceBlock();
global $auth;
$auth = new \ProjectSend\Classes\Auth();
global $assets_loader;
$assets_loader = new \ProjectSend\Classes\AssetsLoader();
global $permissions;
$user_id = (user_is_logged_in()) ? CURRENT_USER_ID : null;
$permissions = new \ProjectSend\Classes\Permissions($user_id);