Commit c4b02c12 authored by Gábor Hojtsy's avatar Gábor Hojtsy
Browse files

#174343 by Shiny: move JOIN condition to ON clause in forum_nodeapi, so our...

#174343 by Shiny: move JOIN condition to ON clause in forum_nodeapi, so our SQL is standards compatible
parent ea0f102c
......@@ -251,7 +251,7 @@ function forum_nodeapi(&$node, $op, $teaser, $page) {
$node->tid = $term_id;
}
}
$old_tid = db_result(db_query_range("SELECT t.tid FROM {term_node} t INNER JOIN {node} n WHERE t.vid = n.vid AND n.nid = %d ORDER BY t.vid DESC", $node->nid, 0, 1));
$old_tid = db_result(db_query_range("SELECT t.tid FROM {term_node} t INNER JOIN {node} n ON t.vid = n.vid WHERE n.nid = %d ORDER BY t.vid DESC", $node->nid, 0, 1));
if ($old_tid) {
if (($node->tid != $old_tid) && $node->shadow) {
// A shadow copy needs to be created. Retain new term and add old term.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment