summaryrefslogtreecommitdiff
path: root/modules/node/node.module
diff options
context:
space:
mode:
authorDavid Rothstein <drothstein@gmail.com>2015-03-30 16:38:49 -0400
committerDavid Rothstein <drothstein@gmail.com>2015-03-30 16:38:49 -0400
commitd67fd28f14c9a5e4e596a75749b4e6fb4c80da3d (patch)
treece59b52687a10cc3e75918f342be785f763e3d63 /modules/node/node.module
parent9164413df67a78362fcc04ed3c8ed934ea603e2d (diff)
downloadbrdo-d67fd28f14c9a5e4e596a75749b4e6fb4c80da3d.tar.gz
brdo-d67fd28f14c9a5e4e596a75749b4e6fb4c80da3d.tar.bz2
Issue #1441950 by hefox: Node types removed from hook_node_info with base = 'node_content' cannot be deleted
Diffstat (limited to 'modules/node/node.module')
-rw-r--r--modules/node/node.module8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/node/node.module b/modules/node/node.module
index 0a7560bb9..ebac07902 100644
--- a/modules/node/node.module
+++ b/modules/node/node.module
@@ -739,11 +739,9 @@ function _node_types_build($rebuild = FALSE) {
$type_db = $type_object->type;
// Original disabled value.
$disabled = $type_object->disabled;
- // Check for node types from disabled modules and mark their types for removal.
- // Types defined by the node module in the database (rather than by a separate
- // module using hook_node_info) have a base value of 'node_content'. The isset()
- // check prevents errors on old (pre-Drupal 7) databases.
- if (isset($type_object->base) && $type_object->base != 'node_content' && empty($_node_types->types[$type_db])) {
+ // Check for node types either from disabled modules or otherwise not defined
+ // and mark as disabled.
+ if (empty($type_object->custom) && empty($_node_types->types[$type_db])) {
$type_object->disabled = TRUE;
}
if (isset($_node_types->types[$type_db])) {