@@ -22,7 +22,7 @@ private static function generateExtensionPath(string $path) : string {
22
22
return '' ;
23
23
}
24
24
25
- $ path = explode (' / ' , trim ($ path , ' / ' ));
25
+ $ path = explode (DIRECTORY_SEPARATOR , trim ($ path , DIRECTORY_SEPARATOR ));
26
26
27
27
$ version = JVERSION ;
28
28
$ extension = $ path [0 ];
@@ -35,12 +35,12 @@ private static function generateExtensionPath(string $path) : string {
35
35
else {
36
36
\array_splice ($ path , 1 , 0 , ['tmpl ' ]);
37
37
}
38
- return JPATH_ROOT . ' / components/ ' . \implode (' / ' , $ path );
38
+ return JPATH_ROOT . DIRECTORY_SEPARATOR . ' components ' . DIRECTORY_SEPARATOR . \implode (DIRECTORY_SEPARATOR , $ path );
39
39
}
40
40
41
41
elseif (\strpos ($ extension , 'mod_ ' ) === 0 ) {
42
42
\array_splice ($ path , 1 , 0 , ['tmpl ' ]);
43
- return JPATH_ROOT . ' / modules/ ' . \implode (' / ' , $ path );
43
+ return JPATH_ROOT . DIRECTORY_SEPARATOR . ' modules ' . DIRECTORY_SEPARATOR . \implode (DIRECTORY_SEPARATOR , $ path );
44
44
}
45
45
46
46
elseif (\strpos ($ extension , 'plg_ ' ) === 0 ) {
@@ -49,13 +49,13 @@ private static function generateExtensionPath(string $path) : string {
49
49
\array_push ($ pluginPath , 'tmpl ' );
50
50
51
51
\array_splice ($ path , 0 , 1 , $ pluginPath );
52
- return JPATH_ROOT . ' / plugins/ ' . \implode (' / ' , $ path );
52
+ return JPATH_ROOT . DIRECTORY_SEPARATOR . ' plugins ' . DIRECTORY_SEPARATOR . \implode (DIRECTORY_SEPARATOR , $ path );
53
53
}
54
54
elseif ($ extension === 'layouts ' ) {
55
- return JPATH_ROOT . ' / ' . \implode (' / ' , $ path );
55
+ return JPATH_ROOT . DIRECTORY_SEPARATOR . \implode (DIRECTORY_SEPARATOR , $ path );
56
56
}
57
57
58
- return \implode (' / ' , $ path );
58
+ return \implode (DIRECTORY_SEPARATOR , $ path );
59
59
}
60
60
61
61
public static function getHTMLTemplate (): string
0 commit comments