# HG changeset patch # User Franck Deroche # Date 1272298355 0 # Node ID 4df8f73dc0fe8656200962abc24fc3a9813563f2 # Parent 32d8c9f818a8de37464c5d1072f9c076f4d6f0da Fields: Check the variable before updating a composite, too diff -r 32d8c9f818a8 -r 4df8f73dc0fe mee.module --- a/mee.module Mon Apr 19 10:51:33 2010 +0000 +++ b/mee.module Mon Apr 26 16:12:35 2010 +0000 @@ -192,13 +192,15 @@ } // @@@TODO: Handle failure of fetch - $atom = scald_fetch(scald_search(array('base_id' => $node->nid . ':' . $delta), FALSE, TRUE)); - $atom->publisher = $node->uid; - $atom->title = $node->title; - $atom->authors = array(scald_uid_to_aid($node->uid)); // @@@TODO: This will completely override any authors listed & replace only with the Publisher. - $atom->relationships = empty($scald_included) ? array() : array('includes' => $scald_included); + if (variable_get('mee_register_composites', FALSE)) { + $atom = scald_fetch(scald_search(array('base_id' => $node->nid . ':' . $delta), FALSE, TRUE)); + $atom->publisher = $node->uid; + $atom->title = $node->title; + $atom->authors = array(scald_uid_to_aid($node->uid)); // @@@TODO: This will completely override any authors listed & replace only with the Publisher. + $atom->relationships = empty($scald_included) ? array() : array('includes' => $scald_included); - scald_update_atom($atom); + scald_update_atom($atom); + } } break; // end 'update'