Taxonomy Image Link Alter problems with escaping table names for ti_link_alter table
milesgillham - June 19, 2009 - 00:09
| Project: | Taxonomy Image |
| Version: | 6.x-1.6 |
| Component: | Contrib Link Alter |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | needs work |
Description
I've been getting a lot of log errors of late and upon investigation they were emnating from this module. The temporary table ti_link_alter has some problems starting at line 92. The code should look like the following in that term_data and vocabulary need {} escaping, but no escaping required for ti_link_alter as it's a temporary table.
$tquery = 'SELECT '. implode(', ', $fields) .', t.tid '
."FROM {term_data} t LEFT JOIN {vocabulary} v USING (vid) WHERE t.tid IN ('".
implode("', '", $tid_list) ."')";
$result = db_query_temporary($tquery, 'ti_link_alter');
// Now read them back in the proper order.
$result = db_query("SELECT * FROM ti_link_alter ORDER BY field0, field1, field2, field3");Similarly, line 111 should not be escaped:
db_query("DROP TABLE ti_link_alter");
#1
I've turned my previous post into a patch submission.
Cheers,
Miles