@@ -396,8 +396,8 @@ function pathauto_token_values($type, $object = NULL) {
_pathauto_include();
switch($type){
case'node':
$vid=db_result(db_query_range("SELECT t.vid FROM {term_node} r INNER JOIN {term_data} t ON r.tid = t.tid INNER JOIN {vocabulary} v ON t.vid = v.vid WHERE r.nid = %d ORDER BY v.weight, t.weight, t.name",0,1,$object->nid));
$category=db_fetch_object(db_query("SELECT t.tid, t.name FROM {term_data} t INNER JOIN {term_node} r ON r.tid = t.tid WHERE t.vid = %d AND r.nid = %d ORDER BY weight",0,1,$vid,$object->nid));
$vid=db_result(db_query_range("SELECT t.vid FROM {term_node} r INNER JOIN {term_data} t ON r.tid = t.tid INNER JOIN {vocabulary} v ON t.vid = v.vid WHERE r.nid = %d ORDER BY v.weight, t.weight, t.name",$object->nid,0,1));
$category=db_fetch_object(db_query_range("SELECT t.tid, t.name FROM {term_data} t INNER JOIN {term_node} r ON r.tid = t.tid WHERE t.vid = %d AND r.nid = %d ORDER BY weight",$vid,$object->nid,0,1));
$category->vid=$vid;
// In the realm of nodes these are terms, in the realm of Taxonomy, cats