Skip to content
Permalink
Browse files

Remove remains of Asset.filter.

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 ef607a6180ab2da48fd05b984d85f0916bb4961d
Showing with 0 additions and 32 deletions.
  1. +0 −21 lib/Cake/Test/TestCase/View/Helper/HtmlHelperTest.php
  2. +0 −11 lib/Cake/View/Helper/HtmlHelper.php
@@ -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
*
@@ -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') {
@@ -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);

0 comments on commit ef607a6

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