-
Notifications
You must be signed in to change notification settings - Fork 60
/
Copy pathusers_config.php
97 lines (74 loc) · 2.95 KB
/
users_config.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
<?php
require_once(__DIR__ . '/global.php');
UserConfig::$appName = 'Show Slow';
#UserConfig::$DEBUG = true;
UserConfig::$mysql_host = $host;
UserConfig::$mysql_db = $db;
UserConfig::$mysql_user = $user;
UserConfig::$mysql_password = $pass;
UserConfig::$mysql_port = $port;
UserConfig::$mysql_socket = $socket;
// TODO - implement accounts and then switch it to true.
UserConfig::$useAccounts = false;
#UserConfig::$useAccounts = true;
// uncomment to enable old theme
UserConfig::$theme = 'classic';
/**
* Show power strip as Bootstrap nav pills instead of navbar
*
* @var boolean
*/
UserConfig::$powerStripNavPills = true;
UserConfig::$refererRegexes = array(
'/^http:\/\/www.webpagetest.org\/result\/.*$/' => 'WebPageTest.org test results'
);
#UserConfig::$requireVerifiedEmail = true;
#UserConfig::$adminInvitationOnly = true;
UserConfig::$supportEmailFromName = $supportEmailFromName;
UserConfig::$supportEmailFromEmail = $supportEmailFromEmail;
UserConfig::$supportEmailReplyTo = $supportEmailReplyTo;
if ($amazonSMTPHost && $amazonSMTPUserName && $amazonSMTPPassword) {
UserConfig::$mailer = Swift_Mailer::newInstance(
Swift_SmtpTransport::newInstance($amazonSMTPHost, 587, 'tls')
->setUsername($amazonSMTPUserName)
->setPassword($amazonSMTPPassword)
);
}
UserConfig::$SESSION_SECRET = $sessionSecret;
UserConfig::$admins = $instanceAdmins;
UserConfig::$dont_display_activity_for = $instanceAdmins;
UserConfig::$header = dirname(__FILE__).'/header.php';
UserConfig::$footer = dirname(__FILE__).'/footer.php';
UserConfig::$rememberMeDefault = true;
define('SHOWSLOW_ACTIVITY_ADD_URL', 1);
define('SHOWSLOW_ACTIVITY_PAGETEST_START', 2);
define('SHOWSLOW_ACTIVITY_URL_SEARCH', 3);
// array of activities in the system velue is an array of label and value of activity
UserConfig::$activities[SHOWSLOW_ACTIVITY_ADD_URL] = array('Added URL for monitoring', 5);
UserConfig::$activities[SHOWSLOW_ACTIVITY_PAGETEST_START] = array('Started WebPagetest test', 2);
UserConfig::$activities[SHOWSLOW_ACTIVITY_URL_SEARCH] = array('Searched a URL in the list', 1);
if ($facebookAPIKey) {
UserConfig::loadModule('facebook');
new FacebookAuthenticationModule($facebookAPIKey, $facebookSecret);
}
if ($googleOAuthKey && $googleOAuthSecret) {
UserConfig::loadModule('google_oauth');
new GoogleOAuthAuthenticationModule(
$googleOAuthKey,
$googleOAuthSecret
);
}
if ($linkedinOAuthKey && $linkedinOAuthSecret) {
UserConfig::loadModule('linkedin');
new LinkedInAuthenticationModule($linkedinOAuthKey, $linkedinOAuthSecret);
}
if ($twitterOAuthKey && $twitterOAuthSecret) {
UserConfig::loadModule('twitter');
new TwitterAuthenticationModule($twitterOAuthKey, $twitterOAuthSecret);
}
UserConfig::loadModule('usernamepass');
new UsernamePasswordAuthenticationModule();
// Features
// Flot support is now enabled using $enableFlot and this feature flag is not used
define('SHOWSLOW_FLOT_SUPPORT', 1);
new Feature(SHOWSLOW_FLOT_SUPPORT, 'Flot charting library support', true, true);