diff --git a/location.module b/location.module index b741b775738854aa63a8d105511691c49cd9278d..bcf7f1482b47ee77ee06f810774c274cf4833900 100644 --- a/location.module +++ b/location.module @@ -1466,25 +1466,25 @@ function location_save(&$location, $cow = TRUE) { if (!isset($oldloc[$k])) { // Field missing from old location, automatic save. $changed[$k] = TRUE; + continue; } - if ($oldloc[$k] == $v) { + else if ($oldloc[$k] == $v) { // Exact match, no change. continue; } - else { - // It wasn't equal, but perhaps it was equivilent? - $results = location_invoke_locationapi($location, 'isunchanged', $k, $oldloc[$k]); - $waschanged = TRUE; // First, assume changed. - foreach ($results as $r) { - if ($r) { - $waschanged = FALSE; - } - } - if ($waschanged) { - // Nobody okayed this difference. - $changed[$k] = TRUE; + + // It wasn't equal, but perhaps it was equivilent? + $results = location_invoke_locationapi($location, 'isunchanged', $k, $oldloc[$k]); + $waschanged = TRUE; // First, assume changed. + foreach ($results as $r) { + if ($r) { + $waschanged = FALSE; } } + if ($waschanged) { + // Nobody okayed this difference. + $changed[$k] = TRUE; + } } if (empty($changed)) {