summaryrefslogtreecommitdiff
path: root/modules/translation/translation.module
diff options
context:
space:
mode:
authorGábor Hojtsy <gabor@hojtsy.hu>2007-08-30 15:31:46 +0000
committerGábor Hojtsy <gabor@hojtsy.hu>2007-08-30 15:31:46 +0000
commit4e0071fb8a44c5a91f46638a8414379fa68dad04 (patch)
tree71d08d03cbefb370701a758f21078b47ffefe0f4 /modules/translation/translation.module
parentbfb72d0ec913b9ba423c6c252fb274929d08e2f3 (diff)
downloadbrdo-4e0071fb8a44c5a91f46638a8414379fa68dad04.tar.gz
brdo-4e0071fb8a44c5a91f46638a8414379fa68dad04.tar.bz2
#111127 rollback by chx, slightly extended: roll back node_load cache, it needs more thought and discussion, so postponed until at least Drupal 7
Diffstat (limited to 'modules/translation/translation.module')
-rw-r--r--modules/translation/translation.module17
1 files changed, 0 insertions, 17 deletions
diff --git a/modules/translation/translation.module b/modules/translation/translation.module
index 04ee51bb3..a965b0cad 100644
--- a/modules/translation/translation.module
+++ b/modules/translation/translation.module
@@ -256,7 +256,6 @@ function translation_nodeapi(&$node, $op, $teaser, $page) {
db_query("UPDATE {node} SET tnid = %d, translate = %d WHERE nid = %d", $tnid, 0, $node->translation_source->nid);
}
db_query("UPDATE {node} SET tnid = %d, translate = %d WHERE nid = %d", $tnid, 0, $node->nid);
- translation_clear_node_cache($tnid);
}
break;
@@ -268,7 +267,6 @@ function translation_nodeapi(&$node, $op, $teaser, $page) {
// This is the source node, asking to mark all translations outdated.
db_query("UPDATE {node} SET translate = 1 WHERE tnid = %d AND nid != %d", $node->tnid, $node->nid);
}
- translation_clear_node_cache($node->tnid);
}
break;
@@ -297,26 +295,11 @@ function translation_remove_from_set($node) {
$new_tnid = db_result(db_query('SELECT nid FROM {node} WHERE tnid = %d ORDER BY translate ASC, nid ASC', $node->tnid));
db_query('UPDATE {node} SET tnid = %d WHERE tnid = %d', $new_tnid, $node->tnid);
}
- translation_clear_node_cache($node->tnid);
}
}
}
/**
- * Clear node_load cache for all nodes in the translation set, so we have
- * the proper translation set information in every node.
- *
- * @param $tnid
- * The translation source nid of the translation set, the identifier
- * of the node used to derive all translations in the set.
- */
-function translation_clear_node_cache($tnid) {
- foreach (translation_node_get_translations($tnid) as $node) {
- cache_clear_all($node->nid, 'cache_node');
- }
-}
-
-/**
* Get all nodes in a translation set, represented by $tnid.
*
* @param $tnid