Commit 1bb8993a authored by Dries's avatar Dries

- Patch #909272 by moshe weitzman, David_Rothstein: remove stub update...

- Patch #909272 by moshe weitzman, David_Rothstein: remove stub update functions and renumber the remaining ones.
parent 5d44ff33
......@@ -992,15 +992,27 @@ function update_get_update_list() {
continue;
}
$last_file_name = NULL;
$updates = drupal_map_assoc($updates);
foreach (array_keys($updates) as $update) {
if ($update > $schema_version) {
// The description for an update comes from its Doxygen.
// Omit stub functions that just carry doxygen for developers.
$func = new ReflectionFunction($module . '_update_' . $update);
$description = str_replace(array("\n", '*', '/'), '', $func->getDocComment());
$ret[$module]['pending'][$update] = "$update - $description";
if (!isset($ret[$module]['start'])) {
$ret[$module]['start'] = $update;
// Only read file contents once per .install file.
$current_file_name = $func->getFileName();
if ($current_file_name != $last_file_name) {
$file = file($current_file_name);
$last_file_name = $current_file_name;
}
// Slice out just the body of the function.
$body = array_slice($file, $func->getStartLine(), ($func->getEndLine() - $func->getStartLine()-1));
if (trim(implode('', $body))) {
// The description for an update comes from its Doxygen.
$description = str_replace(array("\n", '*', '/'), '', $func->getDocComment());
$ret[$module]['pending'][$update] = "$update - $description";
if (!isset($ret[$module]['start'])) {
$ret[$module]['start'] = $update;
}
}
}
}
......
......@@ -105,9 +105,10 @@ function locale_update_7001() {
/**
* Allow longer javascript file names.
*
* Moved to update_fix_d7_requirements().
*/
function locale_update_7002() {
// Update moved to update_fix_d7_requirements().
}
/**
......
......@@ -1866,9 +1866,10 @@ function system_update_7005() {
/**
* Registry tables and drop the file key of the menu router, since it is no
* longer needed.
*
* Moved to update_fix_d7_requirements().
*/
function system_update_7006() {
// Update moved to update_fix_d7_requirements().
}
/**
......@@ -1900,9 +1901,10 @@ function system_update_7007() {
/**
* Use the poll_choice primary key to record votes in poll_votes rather than
* the choice order. Rename chorder to weight.
*
* Moved to poll_update_7001().
*/
function system_update_7008() {
// Moved to poll_update_7001().
}
/**
......@@ -1920,7 +1922,6 @@ function system_update_7009() {
* Moved to system_update_6048().
*/
function system_update_7010() {
return '';
}
/**
......@@ -1944,7 +1945,11 @@ function system_update_7011() {
$insert->execute();
}
// system_update_7012() moved to block_update_7002().
/**
* Moved to block_update_7002().
*/
function system_update_7012() {
}
/**
* Convert default time zone offset to default time zone name.
......@@ -2126,7 +2131,11 @@ function system_update_7027() {
module_enable($module_list, FALSE);
}
// system_update_7028() moved to taxonomy_update_7001().
/**
* Moved to taxonomy_update_7001().
*/
function system_update_7028() {
}
/**
* Add new 'view own unpublished content' permission for authenticated users.
......@@ -2301,24 +2310,27 @@ function system_update_7037() {
/**
* Adds fields to the {menu_router} table to allow custom themes to be set per
* page.
*
* Moved to update_fix_d7_requirements().
*/
function system_update_7039() {
// Moved to update_fix_d7_requirements().
}
/**
* Create new date format tables.
*
* Moved to update_fix_d7_requirements().
*/
function system_update_7040() {
// Moved to update_fix_d7_requirements().
}
/**
* Adds 'delivery_callback' field to the {menu_router} table to allow a custom
* function to be used for final page rendering and sending to browser.
*
* Moved to update_fix_d7_requirements().
*/
function system_update_7041() {
// Moved to update_fix_d7_requirements().
}
/**
......
......@@ -551,7 +551,6 @@ function user_update_7003() {
* Moved to user_update_7012().
*/
function user_update_7004() {
// This doesn't affect any subsequent user updates.
}
/**
......
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