summaryrefslogtreecommitdiff
path: root/includes
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2010-09-25 18:10:53 +0000
committerDries Buytaert <dries@buytaert.net>2010-09-25 18:10:53 +0000
commitb502f4c88a70dc6bc7a942078e6187e7765e2c4f (patch)
tree56811dd7d341faf24abdabffb410f15c4043f77a /includes
parent68c438f805f346f399cf45beaca45b4fd48353c4 (diff)
downloadbrdo-b502f4c88a70dc6bc7a942078e6187e7765e2c4f.tar.gz
brdo-b502f4c88a70dc6bc7a942078e6187e7765e2c4f.tar.bz2
- Patch #909272 by chx: remove stub update functions and renumber the remaining ones.
Diffstat (limited to 'includes')
-rw-r--r--includes/update.inc22
1 files changed, 5 insertions, 17 deletions
diff --git a/includes/update.inc b/includes/update.inc
index c4efc1b7d..ff7fc696c 100644
--- a/includes/update.inc
+++ b/includes/update.inc
@@ -992,27 +992,15 @@ 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) {
- // Omit stub functions that just carry doxygen for developers.
+ // The description for an update comes from its Doxygen.
$func = new ReflectionFunction($module . '_update_' . $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;
- }
+ $description = str_replace(array("\n", '*', '/'), '', $func->getDocComment());
+ $ret[$module]['pending'][$update] = "$update - $description";
+ if (!isset($ret[$module]['start'])) {
+ $ret[$module]['start'] = $update;
}
}
}