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