Curly brackets have been left out at line 137. Critical bug that could wreck multi-site installs.
137c137
< $build_q = 'INSERT INTO {similarnodes} (nid,tid,weight) SELECT n.nid, tn.tid, "%d" as weight FROM node n , term_node tn , term_data dt WHERE n.nid = tn.nid AND tn.tid = dt.tid AND dt.vid = %d';
---
> $build_q = 'INSERT INTO {similarnodes} (nid,tid,weight) SELECT n.nid, tn.tid, "%d" as weight FROM {node} n , {term_node} tn , {term_data} dt WHERE n.nid = tn.nid AND tn.tid = dt.tid AND dt.vid = %d';
Comments
Comment #1
gregglesHere's a patch to fix this and also to fix the query style. Drupal standard is to use "INNER JOIN" instead of doing joins inside of the WHERE clause.
Comment #2
joachim commented+1
Though the patch is missing curlies on term_data :)