Skip to content
Snippets Groups Projects
Commit 0841b018 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Properly calculate the URL for modules

parent 1a7b176d
No related branches found
No related tags found
No related merge requests found
......@@ -172,18 +172,18 @@ class Template extends Response
public function asset($asset, $module = null)
{
$baseDir = $this->configuration->getBaseDir();
$basePath = $this->configuration->getBasePath();
if (is_null($module)) {
$file = $baseDir.'www/assets/'.$asset;
$basePath = $this->configuration->getBasePath();
$path = $basePath.'assets/'.$asset;
} else {
$file = $baseDir.'modules/'.$module.'/www/assets/'.$asset;
$path = $basePath.'module.php/'.$module.'/assets/'.$asset;
$path = Module::getModuleUrl($module.'/assets/'.$asset);
}
if (!file_exists($file)) {
// don't be too harsh if an asset is missing, just pretend it's there...
return $basePath.'assets/'.$asset;
return $path;
}
$tag = $this->configuration->getVersion();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment