-
Notifications
You must be signed in to change notification settings - Fork 12
/
_config.php
27 lines (23 loc) · 964 Bytes
/
_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
<?php
/**
* General CWP configuration
*
* More configuration is applied in cwp/_config/config.yml for APIs that use
* {@link Config} instead of setting statics directly.
* NOTE: Put your custom site configuration into mysite/_config/config.yml
* and if absolutely necessary if you can't use the yml file, mysite/_config.php instead.
*/
use SilverStripe\Core\Environment;
use SilverStripe\HybridSessions\HybridSession;
// default to the binary being in the usual path on Linux
if (!Environment::getEnv('WKHTMLTOPDF_BINARY')) {
Environment::setEnv('WKHTMLTOPDF_BINARY', '/usr/local/bin/wkhtmltopdf');
}
// Automatically configure session key for activedr with hybridsessions module
if (Environment::getEnv('CWP_INSTANCE_DR_TYPE')
&& Environment::getEnv('CWP_INSTANCE_DR_TYPE') === 'active'
&& Environment::getEnv('SS_SESSION_KEY')
&& class_exists(HybridSession::class)
) {
HybridSession::init(Environment::getEnv('SS_SESSION_KEY'));
}