? 1064666 - location-user-field-update.patch
? 1064666-cck_node-empty-saving-fix.patch
? 1064666-location-view-fields.patch
? 1064666-node-and-user-test.patch
? _notes
? man.exe.stackdump
? contrib/location_cck/_notes
Index: location.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/location/location.module,v
retrieving revision 1.222.2.42.2.21
diff -r1.222.2.42.2.21 location.module
843c843,844
<   if (isset($locations) && is_array($locations) && !empty($criteria) && is_array($criteria)) {
---
>   
>     if (isset($locations) && is_array($locations) && !empty($locations) && !empty($criteria) && is_array($criteria)) {
900a902,904
>   else{
> 	 // drupal_set_message("no data to save (locations empty || criteria empty)");
>   }
1359c1363,1370
<     if ($changed['street'] || $changed['additional'] || $changed['city'] || $changed['province'] || $changed['country'] || $changed['postal_code'] || $location['source'] == LOCATION_LATLON_USER_SUBMITTED) {
---
>     if ((array_key_exists('street',$changed) && $changed['street']) || 
> 	    (array_key_exists('additional',$changed) && $changed['additional']) ||
> 		(array_key_exists('city',$changed) && $changed['city']) ||
> 		(array_key_exists('street',$changed) && $changed['street']) ||
> 		(array_key_exists('province',$changed) && $changed['province']) ||
> 		(array_key_exists('country',$changed) && $changed['country']) ||
> 		(array_key_exists('postal_code',$changed) && $changed['postal_code']) ||
> 		$location['source'] == LOCATION_LATLON_USER_SUBMITTED) {
1580a1592
> 	
Index: contrib/location_cck/location_cck.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/location/contrib/location_cck/location_cck.module,v
retrieving revision 1.5.2.20.2.9
diff -r1.5.2.20.2.9 location_cck.module
155a156,157
>   $criteria = array();
>   
163d164
<     location_save_locations($items, $criteria);
164a166,173
>   else if($entity_type == 'user'){
>     $criteria = array(
> 	'genid' => 'cck:' . $field['field_name'] . ':' . $entity->uid, 
> 	'uid' => $entity->uid,
> 	);
>   }
>   
>   location_save_locations($items, $criteria);
170a180,181
>   $criteria = array();
>   drupal_set_message("location_cck_field_update, $entity_type");
178d188
<     location_save_locations($items, $criteria);
179a190,197
>   else if($entity_type == 'user'){
>     $criteria = array(
> 	'genid' => 'cck:' . $field['field_name'] . ':' . $entity->uid, 
> 	'uid' => $entity->uid,
> 	);
>   }
>   
>   location_save_locations($items, $criteria);
181d198
< 
223a241
>   $key = 'vid';
225,237c243,262
<     foreach ($entities as $id => $entity) {
<       foreach ($items[$id] as $delta => $item) {
<         $location = array();
<         // Load the location if it exists.
<         // If we are previewing a new node it will not.
<         if (!empty($item['lid'])) {
<           $location = location_load_location($item['lid']);
<         }
<         // Combine the item with the location loaded from the database.
<         // This will allow $item to display in the case of previewing a node.
<         $items[$id][$delta] = array_merge($location, $item);
<       }
<     }
---
>     $key = 'vid';
>   }else if($entity_type == 'user'){
>     $key = 'uid';
>   }else{
> 	//drupal_set_message(t("Location CCK : entity type $entity_type not handled"));
> 	return;
>   }
>   
>   foreach ($entities as $id => $entity) {
> 	foreach ($items[$id] as $delta => $item) {
> 	  $location = array();
> 	  // Load the location if it exists.
> 	  // If we are previewing a new node it will not.
> 	  if (!empty($item['lid'])) {
> 		$location = location_load_location($item['lid'],$key);
> 	  }
> 	  // Combine the item with the location loaded from the database.
> 	  // This will allow $item to display in the case of previewing a node.
> 	  $items[$id][$delta] = array_merge($location, $item);
> 	}
