Commit 40e2a3b3 authored by Gerhard Killesreiter's avatar Gerhard Killesreiter
Browse files

#51635, Moving forum post leaving shadow copy results in warning, patch by Zen/webchick

parent 45092bdd
......@@ -298,8 +298,9 @@ function forum_submit(&$node) {
}
}
if ($node->tid && $node->shadow) {
// A shadow copy needs to be created. Retain existing term and add new term.
$terms = array_keys(taxonomy_node_get_terms($node->nid));
if (!in_array($node->tid, $node->terms)) {
if (!in_array($node->tid, $terms)) {
$terms[] = $node->tid;
}
$node->taxonomy = $terms;
......
......@@ -298,8 +298,9 @@ function forum_submit(&$node) {
}
}
if ($node->tid && $node->shadow) {
// A shadow copy needs to be created. Retain existing term and add new term.
$terms = array_keys(taxonomy_node_get_terms($node->nid));
if (!in_array($node->tid, $node->terms)) {
if (!in_array($node->tid, $terms)) {
$terms[] = $node->tid;
}
$node->taxonomy = $terms;
......
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