name) && $types = module_invoke($feature->name, 'node_info')) { foreach ($types as $type => $type_data) { $sql = "SELECT COUNT(*) FROM {node_type} WHERE module = 'node' AND type = '%s'"; // Only update if the hook_node_info type's module is 'features' and the db type's // module is 'node'. if (($type_data['module'] == 'features') && db_result(db_query($sql, $type))) { $ret[] = update_sql("UPDATE {node_type} SET module = 'features' WHERE type = '$type'"); } } } } return $ret; } /** * Update 6101: Set codestate signature for all features. * * This update generates a codestate for all feature/component pairs which * have been installed prior to this version of Features. This prevents * automatic rebuilds from occurring against any rebuildable components * that have been overridden. */ function features_update_6101() { // Ensure all of our own API functions still exist in in this version // of Features. It's possible that the "future me" will not have these // functions, so I should check. module_load_include('inc', 'features', "features.export"); $functions = array( 'features_include', 'features_hook', 'features_get_components', 'features_get_features', 'features_get_signature', 'features_set_signature', ); $doit = TRUE; foreach ($functions as $function) { $doit = $doit && function_exists($function); } if ($doit) { features_include(); $features = array_keys(features_get_features(NULL, TRUE)); $components = array_keys(features_get_components()); foreach ($features as $feature) { if (module_exists($feature)) { foreach ($components as $component) { if (features_hook($component, 'features_rebuild') && features_get_signature('cache', $feature, $component) === FALSE) { features_set_signature($feature, $component, -1); } } } } } return array(); }