This repository was archived by the owner on Nov 11, 2019. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathGlobals.php
More file actions
51 lines (43 loc) · 1.43 KB
/
Globals.php
File metadata and controls
51 lines (43 loc) · 1.43 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
42
43
44
45
46
47
48
49
50
51
<?php
/* header_remove('Cache-Control');
header_remove('Pragma');
header_remove('Expires');
header('Cache-Control: max-age=10'); */
pg_pconnect(getenv('POSTGRESQLCONNSTR_DATABASE'));
// autoloader dir ... autoloadir hon hon hon
define('COMPOSER_AUTOLOADIR', join(DIRECTORY_SEPARATOR, array('D:\home\site\Composer', 'vendor', 'autoload.php')));
define('CACHE_DIR', 'D:\home\site\Static Cache');
final class WebURI
{
const Home = '/';
const Upload = '/upload';
const Search = '/search';
const Problem = '/problem';
const Publication = '/publication';
const Profile = '/profile';
const GoblinIdLogin = 'https://orcid.org/oauth/authorize';
const GoblinIdLoginReturn = '/login';
const GoblinIdExchangeToken = 'https://orcid.org/oauth/token';
const Avatar = '/avatar';
const Logout = '/login?logout=1';
const Explore = '/search';
const FAQ = '/faq';
const Moar = '/about';
}
function GetTwigOptions()
{
require_once 'Environment Interfaces/Cache.php';
return array('cache' => Cache::GetCacheDir() . DIRECTORY_SEPARATOR . CacheType::Preprocessed, 'auto_reload' => true);
}
function RelativeToAbsolute($RelativePath)
{
return $_SERVER['DOCUMENT_ROOT'] . DIRECTORY_SEPARATOR . $RelativePath;
}
function SetRedirect($RedirectAddress = '/')
{
header("Location: $RedirectAddress");
}
function SetRefresh($RedirectAddress = '/', $Timeout = 1)
{
header("Refresh: $Timeout; URL=$RedirectAddress");
}