--- modules/translation/translation.module.orig +++ modules/translation/translation.module @@ -289,7 +289,7 @@ if (is_numeric($tnid) && $tnid) { if (!isset($translations[$tnid])) { $translations[$tnid] = array(); - $result = db_query(db_rewrite_sql('SELECT n.nid, n.title, n.language FROM {node} n WHERE n.tnid = %d'), $tnid); + $result = db_query(db_rewrite_sql('SELECT n.nid, n.title, n.language, n.status, n.type FROM {node} n WHERE n.tnid = %d'), $tnid); while ($node = db_fetch_object($result)) { $translations[$tnid][$node->language] = $node; } @@ -323,9 +323,11 @@ // Check for a node related path, and for its translations. if ((preg_match("!^node/([0-9]+)(/.+|)$!", $path, $matches)) && ($node = node_load((int)$matches[1])) && !empty($node->tnid)) { foreach (translation_node_get_translations($node->tnid) as $language => $translation_node) { + if($translation_node->status || user_access('edit own '. $translation_node->type .' content') || user_access('edit any '. $translation_node->type .' content')){ $paths[$language] = 'node/'. $translation_node->nid . $matches[2]; } } + } return $paths; }