diff --git a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php index 7188a4108..6d0c31cb0 100644 --- a/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php +++ b/lib/Cake/Test/Case/View/Helper/HtmlHelperTest.php @@ -353,7 +353,7 @@ class HtmlHelperTest extends CakeTestCase { $result = $this->Html->image('/test/view/1.gif'); $this->assertTags($result, array('img' => array('src' => '/test/view/1.gif', 'alt' => ''))); - $result = $this->Html->image('test.gif', array('fullPath' => true)); + $result = $this->Html->image('test.gif', array('fullBase' => true)); $here = $this->Html->url('/', true); $this->assertTags($result, array('img' => array('src' => $here . 'img/test.gif', 'alt' => ''))); } diff --git a/lib/Cake/View/Helper/HtmlHelper.php b/lib/Cake/View/Helper/HtmlHelper.php index 789f8db78..7a1943aae 100644 --- a/lib/Cake/View/Helper/HtmlHelper.php +++ b/lib/Cake/View/Helper/HtmlHelper.php @@ -739,8 +739,9 @@ class HtmlHelper extends AppHelper { /** * Creates a formatted IMG element. If `$options['url']` is provided, an image link will be - * generated with the link pointed at `$options['url']`. This method will set an empty - * alt attribute if one is not supplied. + * generated with the link pointed at `$options['url']`. If `$options['fullBase']` is provided, + * the src attribute will receive full address (non-relative url) of the image file. + * This method will set an empty alt attribute if one is not supplied. * * ### Usage * @@ -767,9 +768,9 @@ class HtmlHelper extends AppHelper { $path = $this->assetTimestamp($this->webroot($path)); } - if(!empty($options['fullPath'])) { + if (!empty($options['fullBase'])) { $path = $this->url('/', true) . $path; - unset($options['fullPath']); + unset($options['fullBase']); } if (!isset($options['alt'])) {