Skip to content
This repository has been archived by the owner on Dec 27, 2023. It is now read-only.

Commit

Permalink
Merge branch '2021.11' into 2022.11
Browse files Browse the repository at this point in the history
  • Loading branch information
gitlabci committed Mar 17, 2022
2 parents 442cd1e + 4505b6b commit 8d39bab
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions tine20/Tinebase/Frontend/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -428,23 +428,28 @@ protected function _getFilesToWatch($_fileType, $apps = array())
$filesToWatch = array();

foreach ($orderedApplications as $application) {
if (! empty($apps) && $apps[0] != 'all' && ! in_array($application, $apps)) continue;
switch($_fileType) {
if (! empty($apps) && $apps[0] != 'all' && ! in_array($application, $apps)) {
continue;
}
switch ($_fileType) {
case 'js':
$filesToWatch[] = "{$application}/js/{$application}";
break;
case 'lang':
$fileName = "{$application}/js/{$application}-lang-" . Tinebase_Core::getLocale() . (TINE20_BUILDTYPE == 'DEBUG' ? '-debug' : null) . '.js';
$fileName = "{$application}/js/{$application}-lang-" . Tinebase_Core::getLocale()
. (TINE20_BUILDTYPE == 'DEBUG' ? '-debug' : null) . '.js';
$lang = Tinebase_Core::getLocale();
$customPath = Tinebase_Config::getInstance()->translations;
$basePath = is_readable("$customPath/$lang/$fileName") ? "$customPath/$lang" : '.';
$basePath = ! empty($customPath) && is_readable("$customPath/$lang/$fileName")
? "$customPath/$lang"
: '.';

$langFile = "{$basePath}/{$application}/js/{$application}-lang-" . Tinebase_Core::getLocale() . (TINE20_BUILDTYPE == 'DEBUG' ? '-debug' : null) . '.js';
$langFile = "{$basePath}/{$application}/js/{$application}-lang-" . Tinebase_Core::getLocale()
. (TINE20_BUILDTYPE == 'DEBUG' ? '-debug' : null) . '.js';
$filesToWatch[] = $langFile;
break;
default:
throw new Exception('no such fileType');
break;
}
}

Expand Down

0 comments on commit 8d39bab

Please sign in to comment.