2007-08-16 08:38:29 +02:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The subsites module modifies the behaviour of the CMS - in the SiteTree and Group databases - to store information
|
|
|
|
* about a number of sub-sites, rather than a single site.
|
|
|
|
*/
|
|
|
|
|
|
|
|
Object::add_extension('SiteTree', 'SiteTreeSubsites');
|
|
|
|
// Hack - this ensures that the SiteTree defineMethods gets called before any of its subclasses...
|
|
|
|
new SiteTree();
|
2008-06-19 02:46:51 +02:00
|
|
|
Object::add_extension('ContentController', 'ControllerSubsites');
|
2007-08-16 08:38:29 +02:00
|
|
|
Object::add_extension('LeftAndMain', 'LeftAndMainSubsites');
|
2008-06-19 02:46:51 +02:00
|
|
|
Object::add_extension('LeftAndMain', 'ControllerSubsites');
|
2008-11-20 00:25:43 +01:00
|
|
|
|
2007-08-16 08:38:29 +02:00
|
|
|
Object::add_extension('Group', 'GroupSubsites');
|
2009-05-04 07:03:44 +02:00
|
|
|
Object::add_extension('Member', 'MemberSubsites');
|
2008-01-22 02:27:41 +01:00
|
|
|
Object::add_extension('File', 'FileSubsites');
|
2009-10-05 23:01:01 +02:00
|
|
|
Object::add_extension('ErrorPage', 'ErrorPageSubsite');
|
2008-11-30 22:18:16 +01:00
|
|
|
|
|
|
|
// Backwards compatibility with SilverStripe 2.2
|
|
|
|
if(!class_exists('CMSMenu')) {
|
2009-05-04 07:03:44 +02:00
|
|
|
Director::addRules(100, array(
|
|
|
|
'admin/subsites/$Action/$ID/$OtherID' => 'SubsiteAdmin',
|
|
|
|
));
|
|
|
|
Object::addStaticVars( 'LeftAndMain', array( 'extra_menu_items' => array(
|
|
|
|
'Sub-sites' => array("intranets", "admin/subsites/", 'SubsiteAdmin')
|
2008-11-30 22:18:16 +01:00
|
|
|
)));
|
|
|
|
}
|
2008-12-01 02:49:48 +01:00
|
|
|
|
|
|
|
if(!class_exists('GenericDataAdmin')) {
|
|
|
|
user_error('Please install the module "genericdataadmin" to use subsites', E_USER_ERROR);
|
|
|
|
}
|
2008-11-30 22:18:16 +01:00
|
|
|
?>
|