From 54234219d1fe18413faffb6e6578607d9e7c2816 Mon Sep 17 00:00:00 2001 From: Ingo Schommer Date: Tue, 7 Oct 2008 00:27:46 +0000 Subject: [PATCH] BUGFIX Only include i18n.js if javascript files are included - and to be safe, include the required prototype.js along with the library git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@63698 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- core/Requirements.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/core/Requirements.php b/core/Requirements.php index 4cc72031b..e8a19ce93 100644 --- a/core/Requirements.php +++ b/core/Requirements.php @@ -358,7 +358,11 @@ class Requirements { */ protected static function process_i18n_javascript() { // ensure to include the i18n base library - if(!isset(self::$javascript[SAPPHIRE_DIR . '/javascript/i18n.js'])) { + if( + count(array_diff_key(self::$javascript,self::$blocked)) + && !isset(self::$javascript[SAPPHIRE_DIR . '/javascript/i18n.js']) + ) { + self::$javascript[THIRDPARTY_DIR . '/prototype.js'] = true; self::$javascript[SAPPHIRE_DIR . '/javascript/i18n.js'] = true; }