Index: xmlsitemap_term.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/xmlsitemap/xmlsitemap_term/xmlsitemap_term.module,v retrieving revision 1.1.2.13.2.11 diff -u -p -r1.1.2.13.2.11 xmlsitemap_term.module --- xmlsitemap_term.module 8 Jun 2008 07:33:07 -0000 1.1.2.13.2.11 +++ xmlsitemap_term.module 21 Jul 2008 23:14:10 -0000 @@ -58,29 +58,31 @@ function _xmlsitemap_term_links($exclude break; } $result = db_query(db_rewrite_sql(" - SELECT t.tid, t.vid, v.module, xt.last_changed, xt.previously_changed, xt.priority_override, $coalesce(ua.dst) AS alias + SELECT t.tid, t.vid, v.module, xt.last_changed, xt.previously_changed, xt.priority_override FROM {term_data} t LEFT JOIN {vocabulary} v ON t.vid = v.vid LEFT JOIN {xmlsitemap_term} xt ON t.tid = xt.tid - LEFT JOIN {url_alias} ua ON ua.src = CONCAT('forum/', CAST(t.tid AS $cast)) WHERE (t.vid NOT IN (". (empty($excludes) ? 0 : implode(', ', $excludes)) .") AND xt.priority_override IS NULL OR xt.priority_override >= 0) AND t.tid <> %d GROUP BY t.tid, t.vid, v.module, xt.last_changed, xt.previously_changed, xt.priority_override ", 't', 'tid'), _xmlsitemap_term_frontpage()); while ($term = db_fetch_object($result)) { if ($term->module == 'forum') { + $alias = drupal_lookup_path('alias', "forum/{$term->tid}"); + if ($alias !== FALSE) { + $term->alias = $alias; + } $url = xmlsitemap_url("forum/$term->tid", $term->alias, NULL, NULL, TRUE); } - elseif ($term->module != 'taxonomy' && $path = module_invoke($term->module, 'term_path', $term)) { + else { + $path = taxonomy_term_path($term); $alias = drupal_lookup_path('alias', $path); if ($alias !== FALSE) { $term->alias = $alias; } $url = xmlsitemap_url($path, $term->alias, NULL, NULL, TRUE); } - else { - $url = xmlsitemap_url("taxonomy/term/$term->tid", $term->alias, NULL, NULL, TRUE); - } + $age = time() - $term->last_changed; $interval = empty($term->previously_changed) ? 0 : $term->last_changed - $term->previously_changed; $link = array(