Commit | Line | Data |
---|---|---|
133aecbe | 1 | <?php |
d46a42f1 RK |
2 | /* This Source Code Form is subject to the terms of the Mozilla Public |
3 | * License, v. 2.0. If a copy of the MPL was not distributed with this file, | |
4 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
5 | ||
133aecbe RK |
6 | // error reporting (for testing) |
7 | ini_set('display_errors', 1); error_reporting(E_ALL); | |
8 | ||
133aecbe | 9 | // Extended DOM document class |
2b9aa8f3 | 10 | require_once(__DIR__.'/../php-utility-classes/classes/document.php-class'); |
b19743bc | 11 | // Class for sending emails |
2b9aa8f3 RK |
12 | require_once(__DIR__.'/../php-utility-classes/classes/email.php-class'); |
13 | // Composer-provided libraries (oauth2-server-php, doctrine DBAL) | |
14 | require_once(__DIR__.'/../vendor/autoload.php'); | |
2b9aa8f3 RK |
15 | // Authentication utilities |
16 | require_once(__DIR__.'/authutils.php-class'); | |
17 | // Instantiate server utils. | |
18 | try { | |
9ea26dfc | 19 | $utils = new AuthUtils(); |
74b24877 | 20 | $db = $utils->db; |
9ea26dfc | 21 | $settings = $utils->settings; |
2b9aa8f3 RK |
22 | } |
23 | catch (Exception $e) { | |
24 | $utils = null; | |
9ea26dfc RK |
25 | print('Failed to set up utilities: '.$e->getMessage()); |
26 | exit(1); | |
2b9aa8f3 | 27 | } |
d26d08a1 | 28 | |
74b24877 | 29 | $utils->setUpL10n(); |
8b69f29c | 30 | |
74b24877 RK |
31 | // Set up our OAuth2 Server object |
32 | $server = $utils->getOAuthServer(); | |
133aecbe | 33 | ?> |