From 2dd58c8a66402b4bdb77ec83bfff6d8740518e87 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Mon, 18 May 2009 20:55:10 +0000 Subject: [PATCH] BUGFIX Added base javascript requirements to SiteTree->getCMSFields() to avoid it failing when used outside of CMS context (e.g. in our frameworktest project) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@77093 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/model/SiteTree.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/model/SiteTree.php b/core/model/SiteTree.php index 69130e0e1..f8f582c40 100644 --- a/core/model/SiteTree.php +++ b/core/model/SiteTree.php @@ -1118,6 +1118,9 @@ class SiteTree extends DataObject implements PermissionProvider,i18nEntityProvid */ function getCMSFields() { require_once("forms/Form.php"); + Requirements::javascript(THIRDPARTY_DIR . "/prototype.js"); + Requirements::javascript(THIRDPARTY_DIR . "/behaviour.js"); + Requirements::javascript(THIRDPARTY_DIR . "/behaviour_improvements.js"); Requirements::javascript(CMS_DIR . "/javascript/SitetreeAccess.js"); Requirements::add_i18n_javascript(SAPPHIRE_DIR . '/javascript/lang'); Requirements::javascript(SAPPHIRE_DIR . '/javascript/UpdateURL.js');