Skip to content

Commit

Permalink
prevent block="css" when using inline=false css
Browse files Browse the repository at this point in the history
  • Loading branch information
AD7six committed Jan 15, 2012
1 parent b8598c5 commit 22f844c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/Cake/View/Helper/HtmlHelper.php
Expand Up @@ -232,7 +232,7 @@ public function docType($type = 'html5') {
*
* ### Options
*
* - `inline` Whether or not the link element should be output inline. Set to false to
* - `inline` Whether or not the link element should be output inline. Set to false to
* have the meta tag included in `$scripts_for_layout`, and appended to the 'meta' view block.
* - `block` Choose a custom block to append the meta tag to. Using this option
* will override the inline option.
Expand Down Expand Up @@ -401,7 +401,7 @@ public function link($title, $url = null, $options = array(), $confirmMessage =
*
* ### Options
*
* - `inline` If set to false, the generated tag will be appended to the 'css' block,
* - `inline` If set to false, the generated tag will be appended to the 'css' block,
* and included in the `$scripts_for_layout` layout variable. Defaults to true.
* - `block` Set the name of the block link/style tag will be appended to. This overrides the `inline`
* option.
Expand Down Expand Up @@ -455,12 +455,12 @@ public function css($path, $rel = null, $options = array()) {
}

if ($rel == 'import') {
$out = sprintf($this->_tags['style'], $this->_parseAttributes($options, array('inline'), '', ' '), '@import url(' . $url . ');');
$out = sprintf($this->_tags['style'], $this->_parseAttributes($options, array('inline', 'block'), '', ' '), '@import url(' . $url . ');');
} else {
if ($rel == null) {
$rel = 'stylesheet';
}
$out = sprintf($this->_tags['css'], $rel, $url, $this->_parseAttributes($options, array('inline'), '', ' '));
$out = sprintf($this->_tags['css'], $rel, $url, $this->_parseAttributes($options, array('inline', 'block'), '', ' '));
}

if (empty($options['block'])) {
Expand Down

0 comments on commit 22f844c

Please sign in to comment.