function boxes_update_6103 in Boxes 6
Same name and namespace in other branches
- 7 boxes.install \boxes_update_6103()
Ensure that Spaces overrides are stored as an object, not an array.
File
- ./
boxes.install, line 156
Code
function boxes_update_6103() {
$ret = array();
if (module_exists('spaces')) {
$result = db_query("SELECT * FROM {spaces_overrides} WHERE object_type = 'boxes'");
while ($row = db_fetch_object($result)) {
$v = unserialize($row->value);
$row->value = (object) $v;
drupal_write_record('spaces_overrides', $row, array(
'type',
'id',
'object_type',
'object_id',
));
}
$ret[] = array(
'success' => true,
'query' => 'Updated Spaces overrides',
);
}
return $ret;
}