diff -dur domain.orig/API.php domain/API.php --- domain.orig/API.php 2009-11-01 10:20:19.000000000 -0800 +++ domain/API.php 2010-01-23 12:30:27.000000000 -0800 @@ -483,7 +483,7 @@ * --- 'string' == the query will use '%s' to insert the data. * --- 'integer' == the query will use %d to insert the data. * --- 'float' == the query will use %f to insert the data. - * --- 'binary' == the query will use %b to insert the data. + * --- 'binary' == the query will use '%s' to insert the data. * For more information, see db_query() in the Drupal API documentation. * * - '#weight' [optional] Used to weight the item in the menu system. Should normally be set to zero. Negative values diff -dur domain.orig/domain.admin.inc domain/domain.admin.inc --- domain.orig/domain.admin.inc 2009-11-01 10:20:19.000000000 -0800 +++ domain/domain.admin.inc 2010-01-23 12:29:28.000000000 -0800 @@ -981,11 +981,11 @@ if (isset($data['settings'])) { $settings = unserialize($data['settings']); $settings[$item] = $value; - db_query("UPDATE {domain_conf} SET settings = %b WHERE domain_id = %d", serialize($settings), $key); + db_query("UPDATE {domain_conf} SET settings = '%s' WHERE domain_id = %d", serialize($settings), $key); } else { $settings[$item] = $value; - db_query("INSERT INTO {domain_conf} (domain_id, settings) VALUES (%d, %b)", $key, serialize($settings)); + db_query("INSERT INTO {domain_conf} (domain_id, settings) VALUES (%d, '%s')", $key, serialize($settings)); } } else if (!empty($form_state['values']['variable'])) { @@ -1024,7 +1024,7 @@ * @param $type * The data type defined in hook_domainbatch(). * @return - * A sql-safe string ('%s', %d, %f, %b) for use with db_query(). + * A sql-safe string ('%s', %d, %f, '%s') for use with db_query(). */ function domain_batch_data_type($type) { $return = "'%s'"; @@ -1038,7 +1038,8 @@ $return = "%f"; break; case 'binary': - $return = "%b"; + drupal_set_message('A binary format is used. Please fix.', 'error'); + $return = "'%s'"; break; } return $return; diff -dur domain.orig/domain_conf/domain_conf.admin.inc domain/domain_conf/domain_conf.admin.inc --- domain.orig/domain_conf/domain_conf.admin.inc 2009-10-23 09:33:21.000000000 -0700 +++ domain/domain_conf/domain_conf.admin.inc 2010-01-23 12:29:48.000000000 -0800 @@ -163,11 +163,11 @@ $check = 0; $check = db_result(db_query("SELECT COUNT(domain_id) FROM {domain_conf} WHERE domain_id = %d", $form_state['values']['domain_id'])); if ($check > 0) { - $sql = "UPDATE {domain_conf} SET settings = %b WHERE domain_id = %d"; + $sql = "UPDATE {domain_conf} SET settings = '%s' WHERE domain_id = %d"; db_query($sql, serialize($settings), $form_state['values']['domain_id']); } else { - $sql = "INSERT INTO {domain_conf} (domain_id, settings) VALUES (%d, %b)"; + $sql = "INSERT INTO {domain_conf} (domain_id, settings) VALUES (%d, '%s')"; db_query($sql, $form_state['values']['domain_id'], serialize($settings)); } drupal_set_message(t('Domain options saved successfully.')); diff -dur domain.orig/domain_conf/domain_conf.install domain/domain_conf/domain_conf.install --- domain.orig/domain_conf/domain_conf.install 2009-05-31 11:16:40.000000000 -0700 +++ domain/domain_conf/domain_conf.install 2010-01-23 12:33:39.000000000 -0800 @@ -20,7 +20,7 @@ $schema['domain_conf'] = array( 'fields' => array( 'domain_id' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), - 'settings' => array('type' => 'blob', 'not null' => FALSE)), + 'settings' => array('type' => 'text', 'not null' => FALSE)), 'primary key' => array('domain_id'), ); return $schema; diff -dur domain.orig/domain_conf/domain_conf.module domain/domain_conf/domain_conf.module --- domain.orig/domain_conf/domain_conf.module 2009-11-01 10:20:19.000000000 -0800 +++ domain/domain_conf/domain_conf.module 2010-01-23 12:29:58.000000000 -0800 @@ -600,11 +602,11 @@ // Settings found, update them. if (!empty($settings)) { $settings[$variable] = $value; - db_query("UPDATE {domain_conf} SET settings = %b WHERE domain_id = %d", serialize($settings), $domain_id); + db_query("UPDATE {domain_conf} SET settings = '%s' WHERE domain_id = %d", serialize($settings), $domain_id); } else if (domain_lookup($domain_id) != -1) { $settings = array($variable => $value); - db_query("INSERT INTO {domain_conf} (domain_id, settings) VALUES (%d, %b)", $domain_id, serialize($settings)); + db_query("INSERT INTO {domain_conf} (domain_id, settings) VALUES (%d, '%s')", $domain_id, serialize($settings)); } // Clear the cache. cache_clear_all('variables', 'cache'); diff -dur domain.orig/domain_theme/domain_theme.admin.inc domain/domain_theme/domain_theme.admin.inc --- domain.orig/domain_theme/domain_theme.admin.inc 2009-10-11 07:19:25.000000000 -0700 +++ domain/domain_theme/domain_theme.admin.inc 2010-01-23 12:30:09.000000000 -0800 @@ -183,7 +183,7 @@ db_query("UPDATE {domain_theme} SET status = 0 WHERE domain_id = %d", $domain_id); $check = domain_theme_lookup($domain_id, $theme); if ($check == -1) { - db_query("INSERT INTO {domain_theme} (domain_id, theme, settings, status) VALUES (%d, '%s', %b, 1)", $domain_id, $theme, $settings); + db_query("INSERT INTO {domain_theme} (domain_id, theme, settings, status) VALUES (%d, '%s', '%s', 1)", $domain_id, $theme, $settings); } else { db_query("UPDATE {domain_theme} SET status = 1 WHERE domain_id = %d AND theme = '%s'", $domain_id, $theme); @@ -340,10 +340,10 @@ unset($values['var'], $values['submit'], $values['reset'], $values['form_id'], $values['op'], $values['form_build_id'], $values['form_token'], $values['domain_id'], $values['domain_color'], $values['domain_color_defaults']); $settings = serialize($values); if ($check > 0) { - db_query("UPDATE {domain_theme} SET settings = %b, filepath = '%s' WHERE domain_id = %d AND theme = '%s'", $settings, $filepath, $domain_id, $theme); + db_query("UPDATE {domain_theme} SET settings = '%s', filepath = '%s' WHERE domain_id = %d AND theme = '%s'", $settings, $filepath, $domain_id, $theme); } else { - db_query("INSERT INTO {domain_theme} (domain_id, theme, settings, status, filepath) VALUES (%d, '%s', %b, 0, '%s')", $domain_id, $theme, $settings, $filepath); + db_query("INSERT INTO {domain_theme} (domain_id, theme, settings, status, filepath) VALUES (%d, '%s', '%s', 0, '%s')", $domain_id, $theme, $settings, $filepath); } drupal_set_message(t('The configuration options have been saved.')); } diff -dur domain.orig/domain_theme/domain_theme.install domain/domain_theme/domain_theme.install --- domain.orig/domain_theme/domain_theme.install 2009-06-08 06:57:33.000000000 -0700 +++ domain/domain_theme/domain_theme.install 2010-01-23 12:34:03.000000000 -0800 @@ -21,7 +21,7 @@ 'fields' => array( 'domain_id' => array('type' => 'int', 'not null' => TRUE, 'default' => 0), 'theme' => array('type' => 'varchar', 'length' => '255', 'not null' => TRUE, 'default' => ''), - 'settings' => array('type' => 'blob', 'not null' => FALSE), + 'settings' => array('type' => 'text', 'not null' => FALSE), 'status' => array('type' => 'int', 'size' => 'tiny', 'not null' => TRUE, 'default' => 0), 'filepath' => array('type' => 'varchar', 'length' => '255', 'not null' => FALSE)), 'primary key' => array('domain_id', 'theme'),