From f789043c644119f6c3792935be2d5d4cfe3f6a84 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Sun, 30 Nov 2008 21:18:16 +0000 Subject: [PATCH] BUGFIX Re-added LeftAndMain menu entry in old API which was removed in r65101 in order to support 2.2. Installations --- _config.php | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/_config.php b/_config.php index b8ed4f2..3b471c7 100644 --- a/_config.php +++ b/_config.php @@ -14,4 +14,14 @@ Object::add_extension('LeftAndMain', 'ControllerSubsites'); Object::add_extension('Group', 'GroupSubsites'); Object::add_extension('File', 'FileSubsites'); -?> + +// Backwards compatibility with SilverStripe 2.2 +if(!class_exists('CMSMenu')) { + 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') + ))); +} +?> \ No newline at end of file