Remove nested conditionals.

This commit is contained in:
mark_story 2012-11-25 22:53:39 -05:00
parent 9c0939b888
commit 7402eea9eb

View file

@ -292,8 +292,11 @@ class Helper extends Object {
*/ */
public function assetUrl($path, $options = array()) { public function assetUrl($path, $options = array()) {
if (is_array($path)) { if (is_array($path)) {
$path = $this->url($path, !empty($options['fullBase'])); return $this->url($path, !empty($options['fullBase']));
} elseif (strpos($path, '://') === false) { }
if (strpos($path, '://') !== false) {
return $path;
}
if (!array_key_exists('plugin', $options) || $options['plugin'] !== false) { if (!array_key_exists('plugin', $options) || $options['plugin'] !== false) {
list($plugin, $path) = $this->_View->pluginSplit($path, false); list($plugin, $path) = $this->_View->pluginSplit($path, false);
} }
@ -320,8 +323,6 @@ class Helper extends Object {
} }
$path = $base . $path; $path = $base . $path;
} }
}
return $path; return $path;
} }