summaryrefslogtreecommitdiff
path: root/modules/taxonomy/taxonomy.module
diff options
context:
space:
mode:
Diffstat (limited to 'modules/taxonomy/taxonomy.module')
-rw-r--r--modules/taxonomy/taxonomy.module42
1 files changed, 0 insertions, 42 deletions
diff --git a/modules/taxonomy/taxonomy.module b/modules/taxonomy/taxonomy.module
index 812b43c65..578293eba 100644
--- a/modules/taxonomy/taxonomy.module
+++ b/modules/taxonomy/taxonomy.module
@@ -436,25 +436,6 @@ function taxonomy_term_save($term) {
module_invoke_all('taxonomy_term_insert', $term);
}
- db_delete('taxonomy_term_relation')
- ->condition(db_or()
- ->condition('tid1', $term->tid)
- ->condition('tid2', $term->tid)
- )
- ->execute();
-
- if (!empty($term->relations)) {
- foreach ($term->relations as $related_id) {
- if ($related_id != 0) {
- db_insert('taxonomy_term_relation')
- ->fields(array(
- 'tid1' => $term->tid,
- 'tid2' => $related_id
- ))
- ->execute();
- }
- }
- }
db_delete('taxonomy_term_hierarchy')
->condition('tid', $term->tid)
->execute();
@@ -545,12 +526,6 @@ function taxonomy_term_delete($tid) {
db_delete('taxonomy_term_hierarchy')
->condition('tid', $tid)
->execute();
- db_delete('taxonomy_term_relation')
- ->condition(db_or()
- ->condition('tid1', $tid)
- ->condition('tid2', $tid)
- )
- ->execute();
db_delete('taxonomy_term_synonym')
->condition('tid', $tid)
->execute();
@@ -974,23 +949,6 @@ function taxonomy_node_type($op, $info) {
}
/**
- * Find all term objects related to a given term ID.
- */
-function taxonomy_get_related($tid, $key = 'tid') {
- if ($tid) {
- $result = db_query('SELECT t.*, tid1, tid2 FROM {taxonomy_term_relation}, {taxonomy_term_data} t WHERE (t.tid = tid1 OR t.tid = tid2) AND (tid1 = :tid1 OR tid2 = :tid2) AND t.tid != :tid ORDER BY weight, name', array(':tid' => $tid, ':tid1' => $tid, ':tid2' => $tid));
- $related = array();
- foreach ($result as $term) {
- $related[$term->$key] = $term;
- }
- return $related;
- }
- else {
- return array();
- }
-}
-
-/**
* Find all parents of a given term ID.
*/
function taxonomy_get_parents($tid, $key = 'tid') {