# HG changeset patch # User Franck Deroche # Date 1271674293 0 # Node ID 32d8c9f818a8de37464c5d1072f9c076f4d6f0da # Parent 7bb9f2f3b104e252941489ba924c2e229d9cc34e Fields: Add an hidden variable to choose if a composite should be registered Initially, each MEE association was made to be reusable, which means that a composite atom was registered, was searchable in the library, droppable in another MEE. It turns out that this features wasn't really used in production, and adds a lot of noise in the UI... So we're now checking a variable before registering a composite, and it defaults to off. diff -r 7bb9f2f3b104 -r 32d8c9f818a8 mee.module --- a/mee.module Tue Apr 06 16:01:10 2010 +0000 +++ b/mee.module Mon Apr 19 10:51:33 2010 +0000 @@ -137,16 +137,18 @@ $scald_included = scald_included($sas); $sids = array_unique($scald_included); - $temp_atom = new stdClass; - $temp_atom->type = 'composite'; - $temp_atom->provider = 'mee'; - $temp_atom->base_id = $node->nid . ':' . $delta; - $temp_atom->publisher = $node->uid; - $temp_atom->title = $node->title . ' - ' . $field['widget']['label'] . ' (#' . $delta . ')'; - $temp_atom->authors = array(scald_uid_to_aid($node->uid)); - $temp_atom->relationships = empty($scald_included) ? array() : array('includes' => $scald_included); - - $sid = scald_register_atom($temp_atom); + if (variable_get('mee_register_composites', FALSE)) { + $temp_atom = new stdClass; + $temp_atom->type = 'composite'; + $temp_atom->provider = 'mee'; + $temp_atom->base_id = $node->nid . ':' . $delta; + $temp_atom->publisher = $node->uid; + $temp_atom->title = $node->title . ' - ' . $field['widget']['label'] . ' (#' . $delta . ')'; + $temp_atom->authors = array(scald_uid_to_aid($node->uid)); + $temp_atom->relationships = empty($scald_included) ? array() : array('includes' => $scald_included); + + scald_register_atom($temp_atom); + } // Ressource manager associations if (empty($item['ressource_manager'])) {