Hi


I found two problems with taxonomy_dhtml module, and fixed them.


Can someone with permission please commit these to CVS?


Problem 1: the module is not $db_prefix aware.


Fix: Add curly braces around the table names in the query.


Problem 2: the "id=" tag generated, caused stylesheet conflict, because the first item was called "menu".
Fix: Change the item to be "menu_", so it will not clash with the stylesheet.


Here is the diff of the changes.


File is : taxonomy_dhtml.module

<code>
15c15
<     $js .= "initializeMenu(\"menu$n\", \"actuator$n\");\n";
---
>     $js .= "initializeMenu(\"menu_$n\", \"actuator$n\");\n";
129c129
<     $result = db_query_range("SELECT tid, name FROM term_data WHERE vid = '". $vocabulary->vid. "'", 0, 3);
---
>     $result = db_query_range("SELECT tid, name FROM {term_data} WHERE vid = '". $vocabulary->vid. "'", 0, 3);
154c154
<     $result = db_query_range("SELECT n.nid, n.title, n.type, u.uid, u.name FROM term_node r LEFT JOIN node n ON r.nid = n.nid LEFT JOIN users u ON n.uid = u.uid WHERE n.status = '1' AND r.tid = '$term->tid' ORDER BY n.changed DESC", 0, 50);
---
>     $result = db_query_range("SELECT n.nid, n.title, n.type, u.uid, u.name FROM {term_node} r LEFT JOIN {node} n ON r.nid = n.nid LEFT JOIN {users} u ON n.uid = u.uid WHERE n.status = '1' AND r.tid = '$term->tid' ORDER BY n.changed DESC", 0, 50);
182c182
<       $output .= "<ul class=\"".($term->depth == 0 ? "menuList" : "submenu"). "\" id=\"menu$ul\">\n";
---
>       $output .= "<ul class=\"".($term->depth == 0 ? "menuList" : "submenu"). "\" id=\"menu_$ul\">\n";

Comments

kbahey’s picture

Hi

Did anyone get to commit this yet?

It would be nice if the upcoming RC version had this, so it is all compatible with db_prefix, and does not mess up the taonomy_dhtml page.

Thanks

--
Drupal performance tuning and optimization, hosting, development, and consulting: 2bits.com, Inc. and Twitter at: @2bits
Personal blog: Ba

killes@www.drop.org’s picture

I just committed it. We usually prefer patches to be sent to the devel list. And we prefer unified patches.