Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Move some more functions from update.php to includes/update.inc
means that you require less to implement upgrade scripts.
Comments
Comment #1
gordon CreditAttribution: gordon commentedRemoved a little bit of debugging that I had added.
Comment #2
dwwSure, it'd be great to move those two functions (update_batch() and update_finished()) into includes/update.inc. A few problems/questions:
A) This hunk looks like stray debugging code that should be removed:
B) Why are we looking at $_POST directly here?
C) The PHP doc for the new parameters for update_batch() doesn't follow core's code style. The @param things should be indented 3 spaces from the *, and should be capitalized and written as a complete sentence with a period on the end. They should also wrap to 80 chars. "Start the update batch process" should also end in a period.
Comment #3
dwwOh, whoops -- cross post. #1 already fixed (A). Thanks. ;) (B) and (C) are still open questions.
Comment #4
dwwIn IRC, Gordon pointed out that the answer to (B) is because "exactly how it was being handled in update.php before I made the change". Confirmed. ;) So, it's clearly outside the scope of this issue to change raw $_POST, if it even needs to be changed at all. ;)
Therefore, this only needs work for the cosmetic reasons in (C)...
Comment #5
gordon CreditAttribution: gordon commentedI have cleaned up the above issues. The PHPDoc should be correct now.
Comment #6
dwwRe-rolled to fix a few more PHP doc problems:
- Everything now wraps to 80 characters.
- Used complete sentences everywhere.
- Simplified some of the text.
- Fleshed out the description for update_finished() (a previously undocumented function).
Otherwise, I didn't touch any of the actual code. Tested and update.php still works great. Even though it's my own patch, I'm going to call it RTBC.
Comment #7
webchickCommitted to HEAD. Thanks!