Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
update.module
Priority:
Normal
Category:
Task
Assigned:
Reporter:
Created:
29 Dec 2009 at 00:11 UTC
Updated:
12 Jan 2010 at 07:30 UTC
Jump to comment: Most recent file
To save some code load on every page, we can and should move update_requirements to update.install.
| Comment | File | Size | Author |
|---|---|---|---|
| #4 | 669556-4.update-requirements.patch | 12.65 KB | dww |
| #3 | 669556-update-requirements-D7.patch | 12.76 KB | dave reid |
| #1 | 669556-update-requirements-D7.patch | 12.76 KB | dave reid |
Comments
Comment #1
dave reidI didn't change any t()'s to $t() since this code runs during runtime and never install.
Comment #3
dave reidOops. No failing tests this time.
Comment #4
dwwThe only tiny issue I have with #3 is that it includes an unrelated bug fix. I just moved that to #669714: Remove unnecessary menu_rebuild() from update_uninstall(). Rerolled to remove the 1 line change...
Comment #5
dwwEven though it's technically my patch, I'm going to call #4 RTBC, since a) it's overwhelmingly Dave's code in the first place, I just moved a single line to a different patch and b) it's mostly just moving a few functions from one file to another.
Historical note: I originally put this code in update.module instead of update.install since I was thinking that since we load this via hook_help(), it'd be better to just have it in the .module file than to pull in all of .install, too. However, that was admin-centric thinking. It's true that on admin/*, this patch pulls in slightly more code, but we save a lot of code on all the paths that aren't admin/*, and those are vastly more frequent and important.
Comment #6
webchickThis works for me. Best practice, afaik, is to always put hook_requirements() in .install since phase == 'install' code will only run there anyway.
Committed to HEAD.