Skip to content

Commit

Permalink
Remove remains of Asset.filter.
Browse files Browse the repository at this point in the history
The dispatcher side of this was removed long ago. Clean the other half
up now.
  • Loading branch information
markstory committed Sep 6, 2013
1 parent 7475857 commit ef607a6
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 32 deletions.
21 changes: 0 additions & 21 deletions lib/Cake/Test/TestCase/View/Helper/HtmlHelperTest.php
Expand Up @@ -1057,27 +1057,6 @@ public function testScriptWithBlocks() {
$this->assertNull($result);
}

/**
* Test that Asset.filter.js works.
*
* @return void
*/
public function testScriptAssetFilter() {
Configure::write('Asset.filter.js', 'js.php');

$result = $this->Html->script('jquery-1.3');
$expected = array(
'script' => array('type' => 'text/javascript', 'src' => 'cjs/jquery-1.3.js')
);
$this->assertTags($result, $expected);

$result = $this->Html->script('//example.com/js/jquery-1.3.js');
$expected = array(
'script' => array('type' => 'text/javascript', 'src' => '//example.com/js/jquery-1.3.js')
);
$this->assertTags($result, $expected);
}

/**
* testScriptWithFullBase method
*
Expand Down
11 changes: 0 additions & 11 deletions lib/Cake/View/Helper/HtmlHelper.php
Expand Up @@ -451,13 +451,6 @@ public function css($path, $options = array()) {
} else {
$url = $this->assetUrl($path, $options + array('pathPrefix' => Configure::read('App.cssBaseUrl'), 'ext' => '.css'));
$options = array_diff_key($options, array('fullBase' => null, 'pathPrefix' => null));

if (Configure::read('Asset.filter.css')) {
$pos = strpos($url, Configure::read('App.cssBaseUrl'));
if ($pos !== false) {
$url = substr($url, 0, $pos) . 'ccss/' . substr($url, $pos + strlen(Configure::read('App.cssBaseUrl')));
}
}
}

if ($options['rel'] == 'import') {
Expand Down Expand Up @@ -552,10 +545,6 @@ public function script($url, $options = array()) {
if (strpos($url, '//') === false) {
$url = $this->assetUrl($url, $options + array('pathPrefix' => Configure::read('App.jsBaseUrl'), 'ext' => '.js'));
$options = array_diff_key($options, array('fullBase' => null, 'pathPrefix' => null));

if (Configure::read('Asset.filter.js')) {
$url = str_replace(Configure::read('App.jsBaseUrl'), 'cjs/', $url);
}
}
$attributes = $this->_parseAttributes($options, array('block', 'once'), ' ');
$out = sprintf($this->_tags['javascriptlink'], $url, $attributes);
Expand Down

0 comments on commit ef607a6

Please sign in to comment.