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
This commit is contained in:
Ingo Schommer 2008-10-07 00:27:46 +00:00
parent 711de868c9
commit 54234219d1

View File

@ -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;
}