32 lines
894 B
PHP
Raw Normal View History

2008-10-02 22:48:55 +00:00
<?php
2016-07-20 10:34:52 +12:00
use SilverStripe\Security\Member;
2016-08-16 16:38:31 +12:00
use SilverStripe\CMS\Model\SiteTree;
use SilverStripe\Assets\File;
use SilverStripe\SiteConfig\SiteConfig;
use SilverStripe\Control\Director;
2016-08-16 16:38:31 +12:00
2016-07-20 10:34:52 +12:00
2013-03-19 09:46:21 +01:00
Member::add_extension('FrameworkTestRole');
Member::add_extension('FileUploadRole');
SiteTree::add_extension('FrameworkTestSiteTreeExtension');
File::add_extension('FrameworkTestFileExtension');
2017-01-11 10:47:17 +13:00
if (class_exists('SiteTreeCMSWorkflow')) {
SiteConfig::add_extension('CMSWorkflowSiteConfigDecorator');
CMSWorkflowSiteConfigDecorator::apply_active_config();
}
2010-05-03 20:43:40 +00:00
2017-01-11 10:47:17 +13:00
if (!empty($_GET['db'])) {
$enabletranslatable = $_GET['enabletranslatable'];
} elseif (!empty($_SESSION['db'])) {
$enabletranslatable = $_SESSION['enabletranslatable'];
} else {
2017-01-11 10:47:17 +13:00
$enabletranslatable = null;
}
2017-01-11 10:47:17 +13:00
if ($enabletranslatable) {
SiteTree::add_extension('Translatable');
SiteConfig::add_extension('Translatable');
}