Commit 450eab99 authored by Mike Carper's avatar Mike Carper

#1001308: use taxonomy_term_path for taxonomy paths.

parent c5c6e964
...@@ -139,6 +139,13 @@ function expire_node($node) { ...@@ -139,6 +139,13 @@ function expire_node($node) {
if (module_exists('taxonomy') && variable_get('expire_flush_node_terms', EXPIRE_FLUSH_NODE_TERMS)) { if (module_exists('taxonomy') && variable_get('expire_flush_node_terms', EXPIRE_FLUSH_NODE_TERMS)) {
// Get old terms from DB // Get old terms from DB
$tids = expire_taxonomy_node_get_tids($node->nid); $tids = expire_taxonomy_node_get_tids($node->nid);
// Get old terms from static variable
$terms = taxonomy_node_get_terms($node);
if (!empty($terms)) {
foreach ($terms as $term) {
$tids[$term->tid] = $term->tid;
}
}
// Get new terms from node object // Get new terms from node object
if (!empty($node->taxonomy)) { if (!empty($node->taxonomy)) {
foreach ($node->taxonomy as $vocab) { foreach ($node->taxonomy as $vocab) {
...@@ -152,7 +159,8 @@ function expire_node($node) { ...@@ -152,7 +159,8 @@ function expire_node($node) {
$filenames = array(); $filenames = array();
foreach ($tids as $tid) { foreach ($tids as $tid) {
if (is_numeric($tid)) { if (is_numeric($tid)) {
$paths['term' . $tid] = 'taxonomy/term/' . $tid; $term = taxonomy_get_term($tid);
$paths['term' . $tid] = taxonomy_term_path($term);
} }
} }
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment