From facfbff78f0563353caeaf3ec1732e5693b81d6b Mon Sep 17 00:00:00 2001 From: Jean-Marie Simonet Date: Tue, 13 Feb 2018 10:15:10 +0100 Subject: [PATCH] Chinese calendar js files don't load on Linux because they are not lowercase. --- libraries/joomla/form/fields/calendar.php | 4 ++++ libraries/src/HTML/HTMLHelper.php | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/libraries/joomla/form/fields/calendar.php b/libraries/joomla/form/fields/calendar.php index 8ffb6d93b1eda..198714349ef6a 100644 --- a/libraries/joomla/form/fields/calendar.php +++ b/libraries/joomla/form/fields/calendar.php @@ -284,6 +284,10 @@ protected function getLayoutData() { $localesPath = 'system/fields/calendar-locales/' . strtolower($tag) . '.js'; } + elseif (is_file(JPATH_ROOT . '/media/system/js/fields/calendar-locales/' . $tag . '.js')) + { + $localesPath = 'system/fields/calendar-locales/' . $tag . '.js'; + } elseif (is_file(JPATH_ROOT . '/media/system/js/fields/calendar-locales/' . strtolower(substr($tag, 0, -3)) . '.js')) { $localesPath = 'system/fields/calendar-locales/' . strtolower(substr($tag, 0, -3)) . '.js'; diff --git a/libraries/src/HTML/HTMLHelper.php b/libraries/src/HTML/HTMLHelper.php index b13fe524f8db7..7b0ece4034efb 100644 --- a/libraries/src/HTML/HTMLHelper.php +++ b/libraries/src/HTML/HTMLHelper.php @@ -1013,6 +1013,10 @@ public static function calendar($value, $name, $id, $format = '%Y-%m-%d', $attri { $localesPath = 'system/fields/calendar-locales/' . strtolower($tag) . '.js'; } + elseif (is_file(JPATH_ROOT . '/media/system/js/fields/calendar-locales/' . $tag . '.js')) + { + $localesPath = 'system/fields/calendar-locales/' . $tag . '.js'; + } elseif (is_file(JPATH_ROOT . '/media/system/js/fields/calendar-locales/' . strtolower(substr($tag, 0, -3)) . '.js')) { $localesPath = 'system/fields/calendar-locales/' . strtolower(substr($tag, 0, -3)) . '.js';