summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Bergren2008-09-19 16:42:07 (GMT)
committer Brandon Bergren2008-09-19 16:42:07 (GMT)
commit1e37125fb5bcc5bd74ec095a31c72ee0f9ba1c55 (patch)
tree4ac443765c79c5703cefbdb1e2d68bd7e5cf570d
parent3086147af2e06af7e86ae604231319d2144f6126 (diff)
Fix a warning in the change detection code.
-rw-r--r--location.module26
1 files changed, 13 insertions, 13 deletions
diff --git a/location.module b/location.module
index b741b77..bcf7f14 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)) {