Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
E
expire
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Labels
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Commits
Open sidebar
drupal.org
expire
Commits
450eab99
Commit
450eab99
authored
Dec 23, 2010
by
Mike Carper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#1001308: use taxonomy_term_path for taxonomy paths.
parent
c5c6e964
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
expire.module
expire.module
+9
-1
No files found.
expire.module
View file @
450eab99
...
@@ -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
);
}
}
}
}
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment