diff options
author | Bharat Mediratta <bharat@menalto.com> | 2009-03-14 21:24:32 +0000 |
---|---|---|
committer | Bharat Mediratta <bharat@menalto.com> | 2009-03-14 21:24:32 +0000 |
commit | f9122c79081af873f11fbc164c8ae9d20c81a082 (patch) | |
tree | 1c1f35416ef1c6fd92ddbc3dfe3c5f45c627084b /core/models | |
parent | 51a16d38b823262a01efbef1f79702395a886194 (diff) |
Don't use html::image because it forces absolute urls, which we don't want.
Diffstat (limited to 'core/models')
-rw-r--r-- | core/models/item.php | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/core/models/item.php b/core/models/item.php index 219beae3..5bc166d8 100644 --- a/core/models/item.php +++ b/core/models/item.php @@ -323,11 +323,14 @@ class Item_Model extends ORM_MPTT { $height = $max; } } - return html::image(array("src" => $this->thumb_url(), - "alt" => $this->title, - "width" => $width, - "height" => $height), - $extra_attrs); + + // html::image forces an absolute url which we don't want + return "<img" . html::attributes( + array("src" => $this->thumb_url(), + "alt" => $this->title, + "width" => $width, + "height" => $height)) . + "/>"; } /** @@ -336,11 +339,13 @@ class Item_Model extends ORM_MPTT { * @return string */ public function resize_tag($extra_attrs) { - return html::image(array("src" => $this->resize_url(), - "alt" => $this->title, - "width" => $this->resize_width, - "height" => $this->resize_height), - $extra_attrs); + // html::image forces an absolute url which we don't want + return "<img" . html::attributes( + array("src" => $this->resize_url(), + "alt" => $this->title, + "width" => $resize_width, + "height" => $resize_height)) . + "/>"; } public function movie_tag($extra_attrs) { |