Commit b721f5e0 authored by Dries's avatar Dries

- Patch #570900 by Crell: remove remnants of update_sql().

parent ca833681
...@@ -1460,7 +1460,7 @@ function drupal_anonymous_user($session = '') { ...@@ -1460,7 +1460,7 @@ function drupal_anonymous_user($session = '') {
* function called from drupal_bootstrap (recursion). * function called from drupal_bootstrap (recursion).
* @return * @return
* The most recently completed phase. * The most recently completed phase.
* *
*/ */
function drupal_bootstrap($phase = NULL, $new_phase = TRUE) { function drupal_bootstrap($phase = NULL, $new_phase = TRUE) {
$final_phase = &drupal_static(__FUNCTION__ . '_final_phase'); $final_phase = &drupal_static(__FUNCTION__ . '_final_phase');
......
...@@ -452,12 +452,6 @@ function update_do_one($module, $number, &$context) { ...@@ -452,12 +452,6 @@ function update_do_one($module, $number, &$context) {
} }
$ret['results']['query'] = $function($context['sandbox']); $ret['results']['query'] = $function($context['sandbox']);
$ret['results']['success'] = TRUE; $ret['results']['success'] = TRUE;
// @TODO Remove this block after all updates have been converted to
// return only strings.
if (is_array($ret['results']['query'])) {
$ret = $ret['results']['query'];
}
} }
// @TODO We may want to do different error handling for different exception // @TODO We may want to do different error handling for different exception
// types, but for now we'll just print the message. // types, but for now we'll just print the message.
...@@ -470,13 +464,6 @@ function update_do_one($module, $number, &$context) { ...@@ -470,13 +464,6 @@ function update_do_one($module, $number, &$context) {
} }
} }
// @TODO Remove this block after all updates have been converted to return
// only strings.
if (isset($ret['#finished'])) {
$context['finished'] = $ret['#finished'];
unset($ret['#finished']);
}
if (isset($context['sandbox']['#finished'])) { if (isset($context['sandbox']['#finished'])) {
$context['finished'] = $context['sandbox']['#finished']; $context['finished'] = $context['sandbox']['#finished'];
unset($context['sandbox']['#finished']); unset($context['sandbox']['#finished']);
......
...@@ -738,7 +738,7 @@ function system_schema() { ...@@ -738,7 +738,7 @@ function system_schema() {
'primary key' => array('type'), 'primary key' => array('type'),
); );
// This table's name is plural as some versions of MySQL can't create a // This table's name is plural as some versions of MySQL can't create a
// table named 'date_format'. // table named 'date_format'.
$schema['date_formats'] = array( $schema['date_formats'] = array(
'description' => 'Stores configured date formats.', 'description' => 'Stores configured date formats.',
...@@ -1630,37 +1630,29 @@ function system_update_last_removed() { ...@@ -1630,37 +1630,29 @@ function system_update_last_removed() {
* Increase the size of the 'load_functions' and 'to_arg_functions' fields in table 'menu_router'. * Increase the size of the 'load_functions' and 'to_arg_functions' fields in table 'menu_router'.
*/ */
function system_update_6048() { function system_update_6048() {
$ret = array(); db_change_field('menu_router', 'load_functions', 'load_functions', array('type' => 'text', 'not null' => TRUE,));
db_change_field($ret, 'menu_router', 'load_functions', 'load_functions', array('type' => 'text', 'not null' => TRUE,)); db_change_field('menu_router', 'to_arg_functions', 'to_arg_functions', array('type' => 'text', 'not null' => TRUE,));
db_change_field($ret, 'menu_router', 'to_arg_functions', 'to_arg_functions', array('type' => 'text', 'not null' => TRUE,));
return $ret;
} }
/** /**
* Replace src index on the {url_alias} table with src, language. * Replace src index on the {url_alias} table with src, language.
*/ */
function system_update_6049() { function system_update_6049() {
$ret = array(); db_drop_index('url_alias', 'src');
db_drop_index($ret, 'url_alias', 'src'); db_add_index('url_alias', 'src_language', array('src', 'language'));
db_add_index($ret, 'url_alias', 'src_language', array('src', 'language'));
return $ret;
} }
/** /**
* Clear any menu router blobs stored in the cache table. * Clear any menu router blobs stored in the cache table.
*/ */
function system_update_6050() { function system_update_6050() {
$ret = array();
cache_clear_all('router:', 'cache_menu', TRUE); cache_clear_all('router:', 'cache_menu', TRUE);
return $ret;
} }
/** /**
* Create a signature_format column. * Create a signature_format column.
*/ */
function system_update_6051() { function system_update_6051() {
$ret = array();
if (!db_column_exists('users', 'signature_format')) { if (!db_column_exists('users', 'signature_format')) {
...@@ -1680,7 +1672,11 @@ function system_update_6051() { ...@@ -1680,7 +1672,11 @@ function system_update_6051() {
// Set the format of existing signatures to the current default input format. // Set the format of existing signatures to the current default input format.
if ($current_default_filter = variable_get('filter_default_format', 0)) { if ($current_default_filter = variable_get('filter_default_format', 0)) {
$ret[] = update_sql("UPDATE {users} SET signature_format = ". $current_default_filter); db_update('users')
->fields(array(
'signature_format' => $current_default_filter,
))
->execute();
} }
drupal_set_message("User signatures no longer inherit comment input formats. Each user's signature now has its own associated format that can be selected on the user's account page. Existing signatures have been set to your site's default input format."); drupal_set_message("User signatures no longer inherit comment input formats. Each user's signature now has its own associated format that can be selected on the user's account page. Existing signatures have been set to your site's default input format.");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment