mirror of
https://github.com/humhub/humhub.git
synced 2025-01-17 22:28:51 +01:00
Fix: Themes were not applied to modules on Windows Systems.
This commit is contained in:
parent
1c82f9fa13
commit
8770051440
@ -92,13 +92,15 @@ class Theme extends \yii\base\Theme
|
||||
*/
|
||||
protected function autoFindModuleView($path)
|
||||
{
|
||||
$sep = preg_quote(DIRECTORY_SEPARATOR);
|
||||
|
||||
// .../moduleId/views/controllerId/viewName.php
|
||||
if (preg_match('@.*/(.*?)/views/(.*?)/(.*?)\.php$@', $path, $hits)) {
|
||||
if (preg_match('@.*'.$sep.'(.*?)'.$sep.'views'.$sep.'(.*?)'.$sep.'(.*?)\.php$@', $path, $hits)) {
|
||||
return $this->getBasePath() . '/views/' . $hits[1] . '/' . $hits[2] . '/' . $hits[3] . '.php';
|
||||
}
|
||||
|
||||
// /moduleId/[widgets|activities|notifications]/views/viewName.php
|
||||
if (preg_match('@.*/(.*?)/(widgets|notifications|activities)/views/(.*?)\.php$@', $path, $hits)) {
|
||||
if (preg_match('@.*'.$sep.'(.*?)'.$sep.'(widgets|notifications|activities)'.$sep.'views'.$sep.'(.*?)\.php$@', $path, $hits)) {
|
||||
return $this->getBasePath() . '/views/' . $hits[1] . '/' . $hits[2] . '/' . $hits[3] . '.php';
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user