This patch allows admins who are using devel.module to optionally toggle the page timer, query logger and page redirection for each request using GET parameters rather than navigating to admin/settings/devel and flipping the global settings back and forth. I added this since I usually don't need to print out this information for every page. Now I just use:
http://example.com/index.php?q=node&dev_query=1
for the request I'm interested in. Two other params can also be toggled: dev_timer and dev_redirect.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | devel_GET_params_module.patch | 2.82 KB | matt westgate |
| devel_GET_params_core.patch | 2.38 KB | matt westgate |
Comments
Comment #1
matt westgate commentedAnd the patch for devel.module
Comment #2
Steven commentedPerhaps we should move the trinary operator and variable_get into a small function: it would be cleaner in the code.
Comment #3
Steven commentedIn fact, why not create a copy of variable_get which gets its value from the database, but overrides it with a get parameter if it exists? That would be the cleanest, it can be used in devel.module as well as elsewhere...
Comment #4
moshe weitzman commentedthats a good idea, although some implementations might want only certain users (i.e. permission check) to be able to override via _GET param. I suppose that could be handled in the calling code.
Comment #5
killes@www.drop.org commentedI am not convinced this is neccessary.
the devel output from devel.module is sometimes a bit annoying, I admit that, but it is just one mysql statement to switch it off. :)
For me this is easier than to type a get parameter into the location bar.
If at all a devel version of variable_get would be nice.
The review brought to you by Patch Bingo!
Comment #6
Jaza commentedI'm also not convinced that this is necessary. And I'm not sure if it's still relevant or not. Anyway, I'm assuming that it is still relevant, and moving it to 6.x queue.
If someone more knowledgeable about devel.module knows that this patch is no longer needed, feel free to close this issue.
Comment #7
wim leersDoesn't affect Drupal core. Might even already be implemented in Devel module by now. If so, please close this issue.
Comment #8
moshe weitzman commentedyes it is core, and yes it is relevant. the dev_query variable is used in _db_query() which is a core function.
Comment #9
wim leersMy apologies for my previous follow-up, which was completely incorrect.
In my attempt to clean up the issue queue a bit, I accidentally only looked at the second patch posted here. Which is only for devel.module, hence my incorrect conclusion.
Reverted to the state before my follow-up. Since it doesn't affect the API, I'm not pushing it to 7.x-dev.
Comment #10
wim leersMoving to D7.
Comment #11
wim leers