Browse Source

Fixes issue #403

tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
586752369c
  1. 5
      framework/yii/web/AssetManager.php

5
framework/yii/web/AssetManager.php

@ -282,6 +282,9 @@ class AssetManager extends Component
*/ */
public function getPublishedPath($path) public function getPublishedPath($path)
{ {
if (isset($this->_published[$path])) {
return $this->_published[$path][0];
}
if (($path = realpath($path)) !== false) { if (($path = realpath($path)) !== false) {
$base = $this->basePath . DIRECTORY_SEPARATOR; $base = $this->basePath . DIRECTORY_SEPARATOR;
if (is_file($path)) { if (is_file($path)) {
@ -304,7 +307,7 @@ class AssetManager extends Component
public function getPublishedUrl($path) public function getPublishedUrl($path)
{ {
if (isset($this->_published[$path])) { if (isset($this->_published[$path])) {
return $this->_published[$path]; return $this->_published[$path][1];
} }
if (($path = realpath($path)) !== false) { if (($path = realpath($path)) !== false) {
if (is_file($path)) { if (is_file($path)) {

Loading…
Cancel
Save