summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrandon Bergren2008-11-24 17:17:19 (GMT)
committer Brandon Bergren2008-11-24 17:17:19 (GMT)
commit2a71aa6aff466df431d40deb0e47a3746a77909f (patch)
tree9e16057f7ccb4674ec168958a44ca85730af3cb4
parent2b771e2051c5694c9216e76a4f68f8eec1dc1dfe (diff)
Fix multiple bugs in the last update routine (renumbered so it will rerun for people using the dev release.
-rw-r--r--location.install18
1 files changed, 13 insertions, 5 deletions
diff --git a/location.install b/location.install
index 07bfddf..7b097ec 100644
--- a/location.install
+++ b/location.install
@@ -1071,24 +1071,32 @@ function location_update_6304() {
}
/**
- * Add per-location-field weights and defaults.
+ * Disabled due to some typos, moved to 6306.
*/
function location_update_6305() {
+ return array();
+}
+
+
+/**
+ * Add per-location-field weights and defaults.
+ */
+function location_update_6306() {
$ret = array();
$result = db_query("SELECT name FROM {variable} WHERE name LIKE 'location_settings_%'");
while ($row = db_fetch_object($result)) {
- $var = variable_get($result->name, array());
+ $var = variable_get($row->name, array());
$collect = $var['form']['fields'];
$var['form']['fields'] = array();
foreach ($collect as $k => $v) {
$var['form']['fields'][$k]['collect'] = $v;
}
// Country 3 has changed to 4 to make requirements code easier.
- if (isset($var['form']['fields']['country']) && $var['form']['fields']['country'] == 3) {
- $var['form']['fields']['country'] = 4;
+ if (isset($var['form']['fields']['country']['collect']) && $var['form']['fields']['country']['collect'] == 3) {
+ $var['form']['fields']['country']['collect'] = 4;
}
// Weight and default values don't need to get set for now.
- variable_set($result->name, $var);
+ variable_set($row->name, $var);
}
return $ret;
}