diff --git a/app/code/local/Aoe/JsCssTstamp/Model/Package.php b/app/code/local/Aoe/JsCssTstamp/Model/Package.php index ae20e2c..d0b3076 100755 --- a/app/code/local/Aoe/JsCssTstamp/Model/Package.php +++ b/app/code/local/Aoe/JsCssTstamp/Model/Package.php @@ -307,7 +307,6 @@ protected function _prepareUrl($uri) } if ($this->addTstampToAssets) { - Mage::log('Aoe_JsCssTsamp: ' . $uri); $matches = array(); if (preg_match('/(.*)\.(gif|png|jpg)$/i', $uri, $matches)) { $uri = $matches[1] . '.' . $this->getVersionKey() . '.' . $matches[2]; @@ -316,4 +315,40 @@ protected function _prepareUrl($uri) return $uri; } + + /** + * Get skin file url + * + * @param string $file + * @param array $params + * @return string + */ + public function getSkinUrl($file = null, array $params = array()) + { + Varien_Profiler::start(__METHOD__); + if (empty($params['_type'])) { + $params['_type'] = 'skin'; + } + if (empty($params['_default'])) { + $params['_default'] = false; + } + $this->updateParamDefaults($params); + if (!empty($file)) { + $result = $this->_fallback($file, $params, array( + array(), + array('_theme' => $this->getFallbackTheme()), + array('_theme' => self::DEFAULT_THEME), + )); + } + $result = $this->getSkinBaseUrl($params) . (empty($file) ? '' : $file); + Varien_Profiler::stop(__METHOD__); + + if ($this->addTstampToAssets) { + $matches = array(); + if (preg_match('/(.*)\.(css|js)$/i', $result, $matches)) { + $result = $matches[1] . '.' . $this->getVersionKey() . '.' . $matches[2]; + } + } + return $result; + } }