Closed (fixed)
Project:
Image
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
12 Dec 2003 at 05:33 UTC
Updated:
26 Dec 2003 at 23:20 UTC
At line 665 in the 1.90 revision of image.module, this line appears:
$match[10][$n] = theme("image_inline_img", $img);
Function image_inline_img() in image.module never gets called and does not exist anywhere else. As a result, an [image:##] link does not get replaced with the appropriate HTML to display the image. Blank is displayed instead.
I'm not familiar enough with the new theme system, but it seems like it is perhaps not being used appropriately here or something. If I hack the code to just call image_inline_img($img) directly instead of through the hook, the page displays correctly.
Comments
Comment #1
TDobes commentedRight you are. I must have missed renaming a couple of functions when I upgraded image.module to CVS. Sorry about that. I've written a patch below, and I will mail it to Bruno as well to be applied to CVS.
...and just FYI: the theme() function now prepends "theme_" (actually, it looks for the current theme name first) on the functions it calls... so theme("myfunction") would call theme_myfunction()... I just missed renaming these themed functions.
Index: image.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/image/image.module,v
retrieving revision 1.90
diff -u -r1.90 image.module
--- image.module 8 Dec 2003 20:18:01 -0000 1.90
+++ image.module 12 Dec 2003 06:18:27 -0000
@@ -1384,12 +1384,12 @@
return $output;
}
-function image_inline_img($img) {
thumb_path\" align=\"$img->align\" border=\"$img->border\" hspace=\"$img->hspace\" vspace=\"$img->vspace\" alt=\"$img->teaser\" />", "node/view/$img->nid");
+function theme_image_inline_img($img) {
global $base_url;
return l("
}
-function image_thumb_browser($data) {
+function theme_image_thumb_browser($data) {
if ($data) {
$output = '
Comment #2
bruno commentedPatch commited to CVS. Thanks Tom!
Comment #3
(not verified) commented