summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorNeil Drumm <drumm@3064.no-reply.drupal.org>2006-10-31 17:01:04 +0000
committerNeil Drumm <drumm@3064.no-reply.drupal.org>2006-10-31 17:01:04 +0000
commit4573af1f55ce509ed3fe41f2fefe0826d41017ab (patch)
treebde8194188dc141364df371c7021e0cc76187bf7 /modules/node/node.module
parent12df72255cc05ef53fa546e1877275d2accac919 (diff)
downloadbrdo-4573af1f55ce509ed3fe41f2fefe0826d41017ab.tar.gz
brdo-4573af1f55ce509ed3fe41f2fefe0826d41017ab.tar.bz2
#80257 by Jaza. Add a hook for content type changes and use it for keeping vocabulary associations.
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index b8582ae00..a8c52d313 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -282,10 +282,14 @@ function node_type_save($info) {
if ($is_existing) {
db_query("UPDATE {node_type} SET type = '%s', name = '%s', module = '%s', has_title = %d, title_label = '%s', has_body = %d, body_label = '%s', description = '%s', help = '%s', min_word_count = %d, custom = %d, modified = %d, locked = %d WHERE type = '%s'", $info->type, $info->name, $info->module, $info->has_title, $info->title_label, $info->has_body, $info->body_label, $info->description, $info->help, $info->min_word_count, $info->custom, $info->modified, $info->locked, $existing_type);
+
+ module_invoke_all('node_type', 'update', $info);
return SAVED_UPDATED;
}
else {
db_query("INSERT INTO {node_type} (type, name, module, has_title, title_label, has_body, body_label, description, help, min_word_count, custom, modified, locked, orig_type) VALUES ('%s', '%s', '%s', %d, '%s', %d, '%s', '%s', '%s', %d, %d, %d, %d, '%s')", $info->type, $info->name, $info->module, $info->has_title, $info->title_label, $info->has_body, $info->body_label, $info->description, $info->help, $info->min_word_count, $info->custom, $info->modified, $info->locked, $info->orig_type);
+
+ module_invoke_all('node_type', 'insert', $info);
return SAVED_NEW;
}
}