mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-04 17:21:39 +09:00
Fix path normalization problem
This commit is contained in:
parent
6085b82d19
commit
fefd3dd895
8 changed files with 62 additions and 18 deletions
|
|
@ -399,6 +399,11 @@ class TemplateParser_v2
|
|||
$dir = '"' . (str_contains($m[1], '/') ? dirname($m[1]) : '') . '"';
|
||||
$path = basename($m[1]);
|
||||
}
|
||||
if (preg_match('#^(.+)/([^/]+)$#', $path, $match))
|
||||
{
|
||||
$dir = '$this->normalizePath(' . $dir . ' . "' . $match[1] . '")';
|
||||
$path = $match[2];
|
||||
}
|
||||
|
||||
// Generate the code to create a new Template object and compile it.
|
||||
$tpl = '<?php $__tpl = new \Rhymix\Framework\Template(' . $dir . ', "' . $path . '", "' . ($this->template->extension ?: 'auto') . '"); ';
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue