summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-09-10 08:06:59 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-09-10 08:06:59 +0000
commitc4b02c121301af3cea351ec6f267aa3b1099bdd5 (patch)
tree4bfded1f2f67746f1f501a624bcbaeea0fdff343
parentea0f102c217de2dc60a865b369b5c24ce8ced87b (diff)
downloadbrdo-c4b02c121301af3cea351ec6f267aa3b1099bdd5.tar.gz
brdo-c4b02c121301af3cea351ec6f267aa3b1099bdd5.tar.bz2
#174343 by Shiny: move JOIN condition to ON clause in forum_nodeapi, so our SQL is standards compatible
-rw-r--r--modules/forum/forum.module2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/forum/forum.module b/modules/forum/forum.module
index a061011f1..01c631c8e 100644
--- a/modules/forum/forum.module
+++ b/modules/forum/forum.module
@@ -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.