105a106 > static $i18nsync_needed = false; 137c138 < if (!empty($node->tnid) && ($fields = i18nsync_node_fields($node->type)) && ($translations = translation_node_get_translations($node->tnid)) && count($translations) > 1) { --- > if ($i18nsync_needed && !empty($node->tnid) && ($fields = i18nsync_node_fields($node->type)) && ($translations = translation_node_get_translations($node->tnid)) && count($translations) > 1) { 147a149,186 > > case 'presave': > // check whether synchronization is necessary: did one of the fields actually change? > if (!empty($node->tnid) && ($fields = i18nsync_node_fields($node->type)) && ($translations = translation_node_get_translations($node->tnid)) && count($translations) > 1) { > if (isset($node->nid) && isset($node->vid)) { > $old_node = node_load($node->nid, $node->vid); > > foreach ($fields as $field) { > > switch ($field) { > case 'files': > // Check whether to sync existing attached files. > if (count((array)$node->files) == count((array)$old_node->files)) { > foreach ((array)$node->files as $fid => $file) { > if (!isset($old_node->files[$fid]) || !empty($file->remove)) { > $i18nsync_needed = true; > break; > } > } > } > else { > $i18nsync_needed = true; > } > break; > > default: > // For fields that don't need special handling. > if (isset($node->$field)) { > if ($node->$field != $old_node->$field) { > $i18nsync_needed = true; > } > } > } > } > } > } > break; >