Using App::themePath inside Dispatcher.

This commit is contained in:
mark_story 2010-06-30 20:23:04 -04:00
parent 91f8e220e4
commit 16cae72417

View file

@ -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);
}