From f9122c79081af873f11fbc164c8ae9d20c81a082 Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sat, 14 Mar 2009 21:24:32 +0000 Subject: Don't use html::image because it forces absolute urls, which we don't want. --- core/models/item.php | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) (limited to 'core') 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 " $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 " $this->resize_url(), + "alt" => $this->title, + "width" => $resize_width, + "height" => $resize_height)) . + "/>"; } public function movie_tag($extra_attrs) { -- cgit v1.2.3