Commit 58675236 by Qiang Xue

Fixes issue #403

parent 4fe732e9
...@@ -282,6 +282,9 @@ class AssetManager extends Component ...@@ -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 ...@@ -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)) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment