theme_amazon_related_links doesn't output CSS class as intended
Michael Curry - May 9, 2007 - 15:50
| Project: | Amazon associate tools |
| Version: | 4.7.x-1.3 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Michael Curry |
| Status: | closed |
Jump to:
Description
The code appears to be written with the intent of generating table entries with the CSS class 'amazontools_related' but it is broken.
Here's a patch against the Drupal-4-7 branch that shows the problem and a fix:
<?php
Index: amazon.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/amazontools/amazon.module,v
retrieving revision 1.29.2.28
diff -u -w -b -F^function -r1.29.2.28 amazon.module
--- amazon.module 29 Mar 2007 16:04:38 -0000 1.29.2.28
+++ amazon.module 9 May 2007 15:39:13 -0000
@@ -1420,7 +1420,7 @@ function theme_amazon_node($node) {
function theme_amazon_related_link($node) {
$module_dir = base_path() . drupal_get_path('module', 'amazon');
$output = '';
- $output .= "<table class=\" class=\"amazontools_related\"><tr>";
+ $output .= "<table class=\"amazontools_related\"><tr>";
$output .= "<td><a href=\"$node->detailpageurl\" target=\"_blank\">";
if ($node->smallimageurl) {
$output .= "<img src=\"$node->smallimageurl\" height=\"$node->smallimageheight\" width=\"$node->smallimagewidth\" alt=\"cover of $node->title\" />";
***** CVS exited normally with code 1 *****
?>| Attachment | Size |
|---|---|
| amazon.module-table-class-fix.patch | 967 bytes |

#1
4.7 is no longer supported :(