mirror of
https://github.com/kamilwylegala/cakephp2-php8.git
synced 2025-01-31 09:06:17 +00:00
Using App::themePath inside Dispatcher.
This commit is contained in:
parent
91f8e220e4
commit
16cae72417
1 changed files with 4 additions and 9 deletions
|
@ -584,14 +584,10 @@ class Dispatcher extends Object {
|
|||
$themeName = $parts[1];
|
||||
unset($parts[0], $parts[1]);
|
||||
$fileFragment = implode('/', $parts);
|
||||
|
||||
$viewPaths = App::path('views');
|
||||
foreach ($viewPaths as $viewPath) {
|
||||
$path = $viewPath . 'themed' . DS . $themeName . DS . 'webroot' . DS;
|
||||
if (file_exists($path . $fileFragment)) {
|
||||
$assetFile = $path . $fileFragment;
|
||||
break;
|
||||
}
|
||||
|
||||
$path = App::themePath($themeName) . 'webroot' . DS;
|
||||
if (file_exists($path . $fileFragment)) {
|
||||
$assetFile = $path . $fileFragment;
|
||||
}
|
||||
} else {
|
||||
$plugin = $parts[0];
|
||||
|
@ -648,7 +644,6 @@ class Dispatcher extends Object {
|
|||
include($assetFile);
|
||||
} else {
|
||||
ob_clean();
|
||||
flush();
|
||||
readfile($assetFile);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue