Closed (fixed)
Project:
Drupal core
Version:
7.x-dev
Component:
update system
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
17 Sep 2008 at 17:57 UTC
Updated:
18 Sep 2010 at 23:01 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
robloachThere must be a better way around this.... Thoughts?
Comment #2
Anonymous (not verified) commentedMakes sense to me, the code looks good; now, I just need to test it.
Comment #3
dries commentedI think this is the correct way to do it. I recommend that we add a PHP comment. With some code comments, this pach is RTBC.
Comment #4
robloachSomeone else may be a better writer then I, but here is the patch with some code comments.....
Comment #5
robloachAvoiding the whitespace bug.
Comment #6
dries commentedLooks great Rob. Committed to CVS HEAD. Thanks.
Comment #7
damien tournoud commentedWas this even tested?
Looks to me that this code will never be called:
because it is just after a
batch_process()(which drupal_goto in the general case...).Also I would like to see this behavior configurable. I'm pretty sure there are use cases (automatic staging etc.) in which you don't want this to happen automatically.
Comment #8
robloachMoved it to the
update_finishedfunction with a session variable keeping track of if the site was previously online. This look better? Also adds a checkbox in "admin/settings/site-maintenance" to allow the user to choose whether this happens or not (FALSE by default).Comment #9
keith.smith commentedA minor issue only, but:
If we refer to "offline mode" in the previous description, the description in the new form field should use the same term rather than "site maintenance", IMO. That would make it something like "When performing a site update, temporarily toggle offline mode."
Also, I'm not certain about the use of the word "Turn" in the title; it strikes me as a use that will be hard to translate directly. Why not something like "Enable offline mode during update", or something similar.
Comment #10
sunAs discussed on IRC, the original logic was sufficient. No extra setting required.
However, added some failsafe check to update_finished(), so that site maintenance is only disabled if everything went really well.
Also, cleaned-up the inline comments.
Comment #11
robloachThanks, sun! It looks good.... Applies cleanly too.
Comment #12
dries commentedCommitted to CVS HEAD. Thanks.
Comment #13
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.
Comment #14
tnanek commentedNot sure if this is the place I should be commenting on it, but right now, when the site is already in maintenance mode prior to going to update it, it incorrectly implies that the site was taken out of maintenance mode. I think the text on the page should be altered if the site was already in maintenance mode prior, but thats just my opinion.
Comment #15
rfay@Ninja Overlord, this is definitely *not* the place to comment on it. Please describe your issue completely and clearly in a new issue. Commenting on a closed issue just means being ignored (because if a tree falls in the forest and nobody hears it, did it really fall?)