Skip to content

Commit

Permalink
* improvement to the function loadLocalLang from TranslationBase: add…
Browse files Browse the repository at this point in the history
… the last slash to the pathname if necessary.
  • Loading branch information
franzholz committed Feb 6, 2019
1 parent 03be17f commit be1431f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@

2019-02-06 Franz Holzinger <franz@ttproducts.de>
* improvement to the function loadLocalLang from TranslationBase: add the last slash to the pathname if necessary.

2019-02-06 Franz Holzinger <franz@ttproducts.de>
* bugfix to the function loadLocalLang from TranslationBase: LocalizationFactory is only capable to load a language file having a xlf extension.
Expand Down
6 changes: 5 additions & 1 deletion Classes/Base/TranslationBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,11 @@ public function loadLocalLang (
if (strpos($this->scriptRelPath, '.php')) {
$basePath .= dirname($this->scriptRelPath) . '/';
} else {
$basePath .= $this->scriptRelPath . '/';
$basePath .= $this->scriptRelPath;
}

if (substr($basePath, -1) != '/') {
$basePath .= '/';
}
}
$basePath .= $langFile;
Expand Down

0 comments on commit be1431f

Please sign in to comment.