-
Notifications
You must be signed in to change notification settings - Fork 13
/
_config.php
31 lines (25 loc) · 894 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
28
29
30
31
<?php
use SilverStripe\Security\Member;
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Assets\File;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\Control\Director;
Member::add_extension('FrameworkTestRole');
Member::add_extension('FileUploadRole');
SiteTree::add_extension('FrameworkTestSiteTreeExtension');
File::add_extension('FrameworkTestFileExtension');
if (class_exists('SiteTreeCMSWorkflow')) {
SiteConfig::add_extension('CMSWorkflowSiteConfigDecorator');
CMSWorkflowSiteConfigDecorator::apply_active_config();
}
if (!empty($_GET['db'])) {
$enabletranslatable = $_GET['enabletranslatable'];
} elseif (!empty($_SESSION['db'])) {
$enabletranslatable = $_SESSION['enabletranslatable'];
} else {
$enabletranslatable = null;
}
if ($enabletranslatable) {
SiteTree::add_extension('Translatable');
SiteConfig::add_extension('Translatable');
}