Skip to content
Snippets Groups Projects
Commit ccaaea9d authored by Greg Knaddison's avatar Greg Knaddison
Browse files

bug #243538 by beholder: Empty 'termalias' placeholder after #241132

parent e9ce4fd2
No related branches found
No related tags found
No related merge requests found
......@@ -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
$label = 'term';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment