Closed (fixed)
Project:
Advanced CSS/JS Aggregation
Version:
7.x-2.4
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Feb 2014 at 11:55 UTC
Updated:
28 Feb 2014 at 08:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
pounardHere is the patch, reviews and comments are welcome. Hope it helps.
Comment #2
pounardActually this method is a very bad idea, you should just drop the check. Reason is that every person that would update the module would run update.php, that's a drupal core hard requirement. Modules don't have to do this kind of checks, if every module did it, we'd actually end up with a seriously messed up runtime.
You have to assume that any sane person would have run the update script before actually trying to hit the site, and that maintainance mode would have been set during the whole update.
The only thing to keep is the static cache to avoid running this method logic at every call, and remove the db_table_exists() check.
I'll post a new patch.
Comment #3
mikeytown2 commentedI've committed this patch. I think the only way to get rid of advagg_enabled would be to use hook_init. Still not sure what way would be better.
Thanks for helping me :)
Comment #4
pounardI think that you should just drop the whole db_table_exists() check (replaced now by the variable_get) because I think that you have to assume users will always have an up to date database, so the check is useless. If you're more confortable with keeping it, why the heck not it won't hurt, but I think it's rather pointless and keep a useless complexity. In a few weeks or months you'll ask yourself why is this piece of code in here anyway?
Thanks for being reactive.