diff --git a/content.module b/content.module index 64f80e5..ccf0a80 100644 --- a/content.module +++ b/content.module @@ -1329,16 +1329,18 @@ function content_types($type_name = NULL, $reset = FALSE) { } } } + if (isset($types[$type_name])) { return $types[$type_name]; } - } - else { - $info = _content_type_info(); - return $info['content types']; + else { + return array('tables' => array(), 'fields' => array(), 'extra' => array()); + } } - return array('tables' => array(), 'fields' => array(), 'extra' => array()); + // No $type_name - return info about all content types. + $info = _content_type_info(); + return $info['content types']; } /** @@ -1605,6 +1607,7 @@ function content_clear_type_cache($rebuild_schema = FALSE) { _content_type_info(TRUE); content_types(NULL, TRUE); content_fields(NULL, NULL, TRUE); + _content_field_types(TRUE); _content_widget_types(TRUE);