Skip to content

Instantly share code, notes, and snippets.

@bcmiller
Created June 22, 2010 16:35
Show Gist options
  • Save bcmiller/448717 to your computer and use it in GitHub Desktop.
Save bcmiller/448717 to your computer and use it in GitHub Desktop.
+<<<<<<< boxes.install
+
+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;
+}
+=======
/**
* Ensure that Spaces overrides are stored as an object, not an array.
@@ -167,3 +183,4 @@ function boxes_update_6103() {
}
return $ret;
}
+>>>>>>> 1.2.2.5
Index: boxes.module
===================================================================
RCS file: /cvs/drupal-contrib/contributions/modules/boxes/boxes.module,v
retrieving revision 1.10.2.6
diff -u -p -r1.10.2.6 boxes.module
--- boxes.module 22 Jun 2010 15:17:05 -0000 1.10.2.6
+++ boxes.module 22 Jun 2010 16:31:43 -0000
@@ -122,7 +122,13 @@ function boxes_block($op = 'list', $delt
case 'save':
$edit['delta'] = $delta;
+<<<<<<< boxes.module
+ if (!$box = boxes_load($delta)) {
+ $box = boxes_create($edit['plugin_key'], $edit);
+ }
+=======
$box = boxes_create($edit['plugin_key'], $edit);
+>>>>>>> 1.10.2.6
$box->save();
break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment