Skip to content
Permalink
Browse files

Using App::themePath inside Dispatcher.

  • Loading branch information...
markstory committed Jul 1, 2010
1 parent 91f8e22 commit 16cae724175f3464d4606a6537b13ffbc30ed723
Showing with 4 additions and 9 deletions.
  1. +4 −9 cake/dispatcher.php
@@ -584,14 +584,10 @@ function asset($url) {
$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 @@ function _deliverAsset($assetFile, $ext) {
include($assetFile);
} else {
ob_clean();
flush();
readfile($assetFile);
}

0 comments on commit 16cae72

Please sign in to comment.
You can’t perform that action at this time.