--- d:/uc_termsofservice.module-rev19.svn000.tmp.module	Thu Sep 29 09:52:15 2011
+++ C:/uc_termsofservice.module	Mon Sep 26 15:04:43 2011
@@ -221,7 +221,8 @@
   if ($nid) {
     if (module_exists('translation')) {
       global $language;
-      $translations = translation_node_get_translations($nid);
+      $node = node_load($nid);
+      $translations = translation_node_get_translations($node->tnid);
       if ($translations[$language->language]) {
         $nid = $translations[$language->language]->nid;
       }
@@ -371,8 +372,8 @@
     if (!user_access('administer nodes')) {
       $where .= " AND n.status = 1";
     }
-    $result = db_query_range(db_rewrite_sql("SELECT n.nid, n.title, u.name FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE $where"), $arg, 0, 10);
-
+    $result = db_query_range("SELECT n.nid, n.title, u.name FROM {node} n INNER JOIN {users} u ON u.uid = n.uid WHERE $where", $arg, 0, 10);    
+    
     $matches = array();
     while ($node = db_fetch_object($result)) {
       $name = empty($node->name) ? variable_get('anonymous', t('Anonymous')) : check_plain($node->name);
