From 0695be1ccf2a2ba83acaecca6b58c92fdc039f26 Mon Sep 17 00:00:00 2001 From: Chad Kieffer Date: Fri, 20 Mar 2009 04:39:27 +0000 Subject: Restore $extra_attrs in img tags. Roll back to using .gThumbnail in quick pane. --- core/models/item.php | 38 ++++++++++++++++++++------------------ 1 file changed, 20 insertions(+), 18 deletions(-) (limited to 'core/models') diff --git a/core/models/item.php b/core/models/item.php index 1aa9a9be..2bfecc76 100644 --- a/core/models/item.php +++ b/core/models/item.php @@ -337,14 +337,15 @@ class Item_Model extends ORM_MPTT { $height = $max; } } - + $attrs = array_merge($extra_attrs, + array( + "src" => $this->thumb_url(), + "alt" => $this->title, + "width" => $width, + "height" => $height) + ); // html::image forces an absolute url which we don't want - return " $this->thumb_url(), - "alt" => $this->title, - "width" => $width, - "height" => $height)) . - "/>"; + return ""; } /** @@ -353,21 +354,22 @@ class Item_Model extends ORM_MPTT { * @return string */ public function resize_tag($extra_attrs) { + $attrs = array_merge($extra_attrs, + array("src" => $this->resize_url(), + "alt" => $this->title, + "width" => $this->resize_width, + "height" => $this->resize_height) + ); // html::image forces an absolute url which we don't want - return " $this->resize_url(), - "alt" => $this->title, - "width" => $this->resize_width, - "height" => $this->resize_height)) . - "/>"; + return ""; } public function movie_tag($extra_attrs) { - return html::anchor($this->file_url(true), "", - array_merge( - $extra_attrs, - array("id" => "player", - "style" => "display:block;width:400px;height:300px"))) . + $attrs = array_merge($extra_attrs, + array("id" => "player", + "style" => "display:block;width:400px;height:300px") + ); + return html::anchor($this->file_url(true), "", $attrs) . ""; -- cgit v1.2.3