Index: leech.module
===================================================================
RCS file: /cvs/drupal/contributions/modules/leech/leech.module,v
retrieving revision 1.4.2.28
diff -u -p -r1.4.2.28 leech.module
--- leech.module	13 Jun 2007 20:56:03 -0000	1.4.2.28
+++ leech.module	17 Jun 2007 18:48:26 -0000
@@ -2778,26 +2778,32 @@ function _leech_news_pass_on_taxonomy(&$
   // 4) get all nodes and apply changes
   $updated = array();
   if ((count($add_tids) != 0 || count($del_tids) != 0)) {
-    $result = db_query("SELECT li.nid, GROUP_CONCAT( tn.tid SEPARATOR ',' ) AS tids
+  // MySQL < 4.1 can not use GROUP_CONCAT - so we replaced this query by some php code
+  /*  $result = db_query("SELECT li.nid, GROUP_CONCAT( tn.tid SEPARATOR ',' ) AS tids
                         FROM {leech_news_item} li
                         LEFT JOIN  {term_node} tn ON tn.nid = li.nid
                         WHERE li.fid = %d
                         GROUP BY nid", $node->nid);
-
-    while ($feeditem_node = db_fetch_object($result)) {
-      $tids = explode(",", $feeditem_node->tids);
-      $nid = $feeditem_node->nid;
-
-      foreach ($tids as $tid) {
-        if (in_array($tid, $del_tids )) {
-          db_query("DELETE FROM {term_node} WHERE nid = %d AND tid = %d", $nid, $tid);
-          $updated[$nid] = 1;
+  */
+    $result = db_query("SELECT nid
+                      FROM {leech_news_item} li
+                      WHERE fid = %d
+                      GROUP BY nid", $node->nid);
+    while ($feeditem = db_fetch_object($result)) {
+      $result_term_node = db_query("SELECT tid
+                                  FROM {term_node} 
+                                  WHERE nid = %d", $feeditem->nid);
+      while ($termnode = db_fetch_object($result_term_node)) {
+        $tids[] = $termnode->tid;
+        if (in_array($termnode->tid, $del_tids )) {
+          db_query("DELETE FROM {term_node} WHERE nid = %d AND tid = %d", $feeditem->nid, $termnode->tid);
+          $updated[$feeditem->nid] = 1;
         }
       }
       foreach ($add_tids as $add_tid) {
         if (!in_array($add_tid, $tids)) {
-          db_query("INSERT INTO {term_node}(nid, tid) VALUES(%d, %d)", $nid, $add_tid);
-          $updated[$nid] = 1;
+          db_query("INSERT INTO {term_node}(nid, tid) VALUES(%d, %d)", $feeditem->nid, $add_tid);
+          $updated[$feeditem->nid] = 1;
         }
       }
     }
