summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG.txt3
-rw-r--r--content_crud.inc9
2 files changed, 9 insertions, 3 deletions
diff --git a/CHANGELOG.txt b/CHANGELOG.txt
index b45a65b..2700017 100644
--- a/CHANGELOG.txt
+++ b/CHANGELOG.txt
@@ -13,7 +13,8 @@
- #257250 by bangpound, sun, JohnAlbin - Panels integration: formatter not properly set.
- #256178 by douggreen - Text: fix warnings around views argument handler.
- #165314 by sleepcamel - Views integration: fix blank links in summary view.
-- #299698 Userreference: autocompletion query when typed string is '0'
+- #299698 Userreference: fix autocompletion query when typed string is '0'.
+- #292872 Do not delete data for content types defined by disabled modules.
5--1.7
======
diff --git a/content_crud.inc b/content_crud.inc
index a4c07aa..2dab6a5 100644
--- a/content_crud.inc
+++ b/content_crud.inc
@@ -91,7 +91,7 @@ function content_type_update($info) {
drupal_set_message(t('Content fields table %old_name has been renamed to %new_name and field instances have been updated.', array('%old_name' => $old_name, '%new_name' => $new_name)));
}
}
- // reset all content type info
+ // reset all content type info.
content_clear_type_cache();
}
@@ -102,6 +102,11 @@ function content_type_update($info) {
* value supplied by hook_node_type()
*/
function content_type_delete($info) {
+ // Don't delete data for content-type defined by disabled modules.
+ if (!empty($info->disabled)) {
+ return;
+ }
+
$type = content_types($info->type);
foreach ($type['fields'] as $field) {
@@ -113,7 +118,7 @@ function content_type_delete($info) {
drupal_set_message(t('The content fields table %name has been deleted.', array('%name' => $table)));
}
- // reset all content type info
+ // Reset all content type info.
content_clear_type_cache();
}