Skip to content

Commit e505b65

Browse files
committed
Fixed the directory separators to prevent language path malfunction.
1 parent 32ec9e9 commit e505b65

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

modules/servers/upCloudVm/Helper.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ class Helper
4242
*/
4343
public static function getLang()
4444
{
45-
$languageDir = dirname(__FILE__).DS.'lang'.DS;
45+
$languageDir = dirname(__FILE__).DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR;
4646
$config = $GLOBALS['CONFIG'];
4747
$language = isset($_SESSION['Language']) ? $_SESSION['Language'] : $config['Language'];
4848
$languageFile = file_exists($languageDir.$language.'.php') ? $language : 'english';
49-
if (file_exists(dirname(__FILE__).DS.'lang'.DS.'english.php'))
49+
if (file_exists(dirname(__FILE__).DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR.'english.php'))
5050
{
51-
include dirname(__FILE__).DS.'lang'.DS.'english.php';
51+
include dirname(__FILE__).DIRECTORY_SEPARATOR.'lang'.DIRECTORY_SEPARATOR.'english.php';
5252
}
5353

5454
require $languageDir.$languageFile.'.php';

0 commit comments

Comments
 (0)