Commit Graph

4359 Commits

Author SHA1 Message Date
Sergey Biryukov
74f77b85a6 Use get_current_site() instead of the $current_site global when possible.
props jeremyfelt.
fixes #25158.
Built from https://develop.svn.wordpress.org/trunk@26120


git-svn-id: http://core.svn.wordpress.org/trunk@26032 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 03:23:10 +00:00
Sergey Biryukov
eae4e5936f Use case-insensitive comparison for email addresses. fixes #25779.
Built from https://develop.svn.wordpress.org/trunk@26115


git-svn-id: http://core.svn.wordpress.org/trunk@26027 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-13 02:41:09 +00:00
Andrew Ozz
541d22e18d Fix the X-UA-Compatible header for IE8, fixes #25575
Built from https://develop.svn.wordpress.org/trunk@26089


git-svn-id: http://core.svn.wordpress.org/trunk@26007 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-11 18:02:10 +00:00
Sergey Biryukov
8d659b278c Fix docblock formatting. fixes #25893.
Built from https://develop.svn.wordpress.org/trunk@26081


git-svn-id: http://core.svn.wordpress.org/trunk@26001 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-11 13:32:10 +00:00
Sergey Biryukov
e15b51efa3 Pass correct 'type' parameter to 'upgrader_process_complete' action in Theme_Upgrader.
props bamadesigner.
fixes #25882 for trunk.
Built from https://develop.svn.wordpress.org/trunk@26049


git-svn-id: http://core.svn.wordpress.org/trunk@25974 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-08 17:04:09 +00:00
Andrew Ozz
0743625aed Add X-UA-Compatible meta tag in the admin, locking the compatibility mode in IE to the highest supported document mode. Fixes #25575.
Built from https://develop.svn.wordpress.org/trunk@26029


git-svn-id: http://core.svn.wordpress.org/trunk@25959 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-06 23:49:09 +00:00
Sergey Biryukov
23de998e29 Fix inverted logic for displaying the 'Broken Theme' string. props pavelevap. fixes #25465.
Built from https://develop.svn.wordpress.org/trunk@26027


git-svn-id: http://core.svn.wordpress.org/trunk@25957 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-06 22:40:08 +00:00
Sergey Biryukov
72d4b140fb Make Twenty Fourteen the default theme. props markmcwilliams. fixes #25702.
Built from https://develop.svn.wordpress.org/trunk@26024


git-svn-id: http://core.svn.wordpress.org/trunk@25955 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-06 20:02:09 +00:00
Dion Hulse
c9683257db Core Upgrader: Include an unmodified $wp_version in Core_Upgrader::upgrade(). This protects against cases where the global $wp_version has been modified. See #25772
Built from https://develop.svn.wordpress.org/trunk@26017


git-svn-id: http://core.svn.wordpress.org/trunk@25948 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-05 06:23:10 +00:00
Dion Hulse
9d011a0556 Core Upgrader success statistics: Pass the version of WordPress we're upgrading from, as well as the version being upgraded to. Props nacin. See #25772 for trunk
Built from https://develop.svn.wordpress.org/trunk@26016


git-svn-id: http://core.svn.wordpress.org/trunk@25947 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-05 06:20:09 +00:00
Dion Hulse
38a69e4ccc Remove dead code from the Plugin Upgrader class. Props jdgrimes. Fixes #25470
Built from https://develop.svn.wordpress.org/trunk@26015


git-svn-id: http://core.svn.wordpress.org/trunk@25946 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-05 05:48:10 +00:00
Dion Hulse
b511346319 When checking filesystem permissions for core updates, only check the permissions of the files which we need to alter. Props nacin for initial patch. Fixes #25771 for trunk
Built from https://develop.svn.wordpress.org/trunk@26014


git-svn-id: http://core.svn.wordpress.org/trunk@25945 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-05 05:43:09 +00:00
Dion Hulse
21a3164b3b Add a filter to the Background Updates debug email, matches the filter used on the non-debug post-update emails. Props pento. Fixes #25756
Built from https://develop.svn.wordpress.org/trunk@26013


git-svn-id: http://core.svn.wordpress.org/trunk@25944 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-05 02:15:10 +00:00
Scott Taylor
ba3f75b3c3 Pass $args to the export_wp action in export_wp(), which is currently passed no arguments.
Props nickdaugherty.
Fixes #25574.


Built from https://develop.svn.wordpress.org/trunk@26011


git-svn-id: http://core.svn.wordpress.org/trunk@25942 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-05 01:27:08 +00:00
Sergey Biryukov
cd45adaa0b Pass comment ID and comment post ID to get_comment_class() in WP_Comments_List_Table::single_row().
props drozdz.
fixes #25814.
Built from https://develop.svn.wordpress.org/trunk@26001


git-svn-id: http://core.svn.wordpress.org/trunk@25934 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-11-04 11:00:11 +00:00
Andrew Nacin
d0cfa40983 Add jshintrc to qunit.
props jorbin.
see #25187.

Built from https://develop.svn.wordpress.org/trunk@25992


git-svn-id: http://core.svn.wordpress.org/trunk@25925 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-30 14:39:10 +00:00
Andrew Nacin
a8ef13972c When an HTTPS request to api.wordpress.org fails, try an insecure HTTP request and issue a warning.
Certain versions of cURL appear to claim OpenSSL support but fail to work. We need to not trap users on older versions while we work this out, and instead fall back to an insecure request.

see #25716 for trunk.

Built from https://develop.svn.wordpress.org/trunk@25956


git-svn-id: http://core.svn.wordpress.org/trunk@25915 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-27 21:09:10 +00:00
Drew Jaynes
4cf7175d6f Inline documentation for hooks in wp-admin/includes/schema.php.
Props johnafish, kpdesign.
Fixes #25498.

Built from https://develop.svn.wordpress.org/trunk@25938


git-svn-id: http://core.svn.wordpress.org/trunk@25897 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-26 20:29:10 +00:00
Drew Jaynes
94a3ee8d68 Inline documentation for hooks in wp-admin/includes/nav-menu.php.
Props Faison.
Fixes #25474.

Built from https://develop.svn.wordpress.org/trunk@25935


git-svn-id: http://core.svn.wordpress.org/trunk@25894 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-26 17:48:11 +00:00
Andrew Nacin
1a2f89d5d0 Avoid a notice for an undefined $checksums variable when updating from pre-3.7 to post-3.7.
props GaryJ.
fixes #25689 for trunk.

Built from https://develop.svn.wordpress.org/trunk@25915


git-svn-id: http://core.svn.wordpress.org/trunk@25878 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-25 20:15:10 +00:00
Andrew Nacin
70fd806759 Revert r25824:25875 from the core.svn.wordpress.org repository.
These commits were accidentally re-synced commits from develop.svn.wordpress.org due to a race condition. Thankfully, the history of this repository matters fairly little. It also happened only for trunk.


git-svn-id: http://core.svn.wordpress.org/trunk@25876 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-25 02:29:52 +00:00
Andrew Nacin
ac2e70227f Make some changes to the email templates to account for the fact that an auto update offer might not be to the latest version.
For example, 3.7.2 install is served a 3.7.3 update, but the current version is 3.8.1.

This commit also allows for core update notification emails to be sent even when we are unable to run an auto update due to filesystem configuration (VCS checkout or file permissions). But, since these emails go through WP_Automatic_Updater, they will not be sent if the updater is outright disabled.

fixes #25654.

Built from https://develop.svn.wordpress.org/trunk@25873


git-svn-id: http://core.svn.wordpress.org/trunk@25873 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 23:00:01 +00:00
Andrew Nacin
d680f71d91 Show the nag we show for a stuck .maintenance file when an auto update failed.
see #25654.

Built from https://develop.svn.wordpress.org/trunk@25872


git-svn-id: http://core.svn.wordpress.org/trunk@25872 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:59:53 +00:00
Andrew Nacin
ff711dba63 "some files" instead of "certain files". Less stuffy.
props markjaquith.
see #25652.

Built from https://develop.svn.wordpress.org/trunk@25871


git-svn-id: http://core.svn.wordpress.org/trunk@25871 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:59:45 +00:00
Andrew Nacin
bed7a78426 New, better error message when we realize we won't be able to copy a file and continue with the update.
fixes #25652.

Built from https://develop.svn.wordpress.org/trunk@25870


git-svn-id: http://core.svn.wordpress.org/trunk@25870 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:59:37 +00:00
Andrew Nacin
d61e188f23 Only enforce disk free space checks when doing background updates.
see #25652.

Built from https://develop.svn.wordpress.org/trunk@25869


git-svn-id: http://core.svn.wordpress.org/trunk@25869 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:59:29 +00:00
Andrew Nacin
5361a8abca Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.

Built from https://develop.svn.wordpress.org/trunk@25868


git-svn-id: http://core.svn.wordpress.org/trunk@25868 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:59:20 +00:00
Andrew Nacin
4b559801ae Updates: Disable maintenance mode once we've finished copying files, to minimize disruption.
props dd32.
fixes #25655.

Built from https://develop.svn.wordpress.org/trunk@25866


git-svn-id: http://core.svn.wordpress.org/trunk@25866 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:59:05 +00:00
Andrew Nacin
3b7e540f00 Updates: Saner stats and rollback handling. WP.org now collects basic stats on non-auto updates as they have been hugely informative.
props dd32 for initial patch.
fixes #25657.

Built from https://develop.svn.wordpress.org/trunk@25863


git-svn-id: http://core.svn.wordpress.org/trunk@25863 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:58:40 +00:00
Andrew Nacin
de7977d66c Move upgrader_process_complete for core to its proper place in Core_Upgrader.
This means it will be firing as a JS redirect is taking place if the update is from pre-3.4. Acceptable.

props dd32.
fixes #25659.

Built from https://develop.svn.wordpress.org/trunk@25861


git-svn-id: http://core.svn.wordpress.org/trunk@25861 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:58:23 +00:00
Andrew Nacin
b134f540e2 Rename the automatic_updates_send_email filter to auto_core_update_send_email. (Final name change.)
fixes #25653. Also:
 * Fully document all new hooks, methods, and classes in the upgrader.
 * Rename 'language' to 'translation' inside the upgrader.
 * Improve the readability of the crazy do-while loop in the is_vcs_checkout() method.

Built from https://develop.svn.wordpress.org/trunk@25859


git-svn-id: http://core.svn.wordpress.org/trunk@25859 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:57:58 +00:00
Andrew Nacin
04bbb52c7c Commit [25823] should not have renamed AUTOMATIC_UPDATER_DISABLED to AUTOMATIC_UPDATES_DISABLED.
The proper constant is AUTOMATIC_UPDATER_DISABLED. Keep the filter in line with that too.

see #22704.

Built from https://develop.svn.wordpress.org/trunk@25851


git-svn-id: http://core.svn.wordpress.org/trunk@25851 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:56:54 +00:00
Andrew Nacin
aea50d4b4c Use correct variable. fixes #10787.
Built from https://develop.svn.wordpress.org/trunk@25843


git-svn-id: http://core.svn.wordpress.org/trunk@25843 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:55:46 +00:00
Andrew Nacin
83b20ee7f9 Notify administrators of successful, failed, and pending core updates.
Blocks future background updates after critical failures, but allow retries in certain situations. More in the ticket.

fixes #10787.

Built from https://develop.svn.wordpress.org/trunk@25841


git-svn-id: http://core.svn.wordpress.org/trunk@25841 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:55:30 +00:00
Andrew Nacin
27d04f9e5e Delete expired transients on database upgrades.
Reverts [25416], which had all transients being cleared. This leaves much to be desired, but we don't want a core update to be blamed for breaking a site that incorrectly assumes transients aren't transient.

props dartiss, pento.
fixes #20316.

Built from https://develop.svn.wordpress.org/trunk@25838


git-svn-id: http://core.svn.wordpress.org/trunk@25838 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:55:02 +00:00
Andrew Nacin
fa4f4033f7 Introduce email templates for automatic background updates.
The four templates are:
 1. We successfully updated their site. If any of their themes or plugins are out of date, it also mentions that. ('success')
 2. We are not configured to update their site, so we notify them of the new release. ('notify')
 3. We tried but failed to update their site. The error was early in the process, so no harm, no foul. This is the same as template #2, plus one sentence. ('fail')
 4. We tried to update their site, and failed while copying files. ('critical')

With assistance from markjaquith.

see #10787.

Built from https://develop.svn.wordpress.org/trunk@25837


git-svn-id: http://core.svn.wordpress.org/trunk@25837 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:54:54 +00:00
Andrew Nacin
93eefa2af3 set_current_screen() is now unnecessary in Automatic_Upgrader_Skin, which is good because it breaks things in the network admin.
fixes #25622.

Built from https://develop.svn.wordpress.org/trunk@25836


git-svn-id: http://core.svn.wordpress.org/trunk@25836 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:54:46 +00:00
Andrew Nacin
a3561e7e07 In automatic background updates, standardize on 'update'.
New, final filter names:
 * auto_update_{$type} (plugin, theme, core, language)
 * automatic_updates_is_vcs_checkout
 * automatic_updates_disabled

New class name is WP_Automatic_Updater. Method names include update() and should_update().

see #22704.

Built from https://develop.svn.wordpress.org/trunk@25835


git-svn-id: http://core.svn.wordpress.org/trunk@25835 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:54:38 +00:00
Dion Hulse
8abd2f86d5 Silence PHP warnings from disk_free_space(). disk_free_space() will produce a warning in error conditions in addition to returning false, this includes a case where the bytes free is greater than PHP_INT_MAX (which is a error condition we don't need to check).
See #25576, #22704

Built from https://develop.svn.wordpress.org/trunk@25831


git-svn-id: http://core.svn.wordpress.org/trunk@25831 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:54:05 +00:00
Dion Hulse
66f01957a0 For Background updates, ensure that only one update process runs at the same time by using the options table as a lock.
This prevents multiple cron spawns and/or long-running updates from causing multiple update processes to spin up.
This also fixes a case where the upgrader might kick in for ( ! is_main_network() || ! is_main_site() ) in mulisite installs.
See #22704

Built from https://develop.svn.wordpress.org/trunk@25828


git-svn-id: http://core.svn.wordpress.org/trunk@25828 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:53:40 +00:00
Andrew Nacin
8ae8e01b67 Remove the old wp_auto_updates_maybe_update cron event. Schedule the new wp_maybe_auto_update event at 7 a.m. and 7 p.m. in the site's timezone.
see #27704.

Built from https://develop.svn.wordpress.org/trunk@25825


git-svn-id: http://core.svn.wordpress.org/trunk@25825 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 22:53:14 +00:00
Andrew Nacin
564b008f67 Add editimage.min.js to $_old_files. see #24999.
Built from https://develop.svn.wordpress.org/trunk@25897


git-svn-id: http://core.svn.wordpress.org/trunk@25809 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 19:27:09 +00:00
Andrew Nacin
0ceb189b7b Confirm delete_site_option() exists before calling it during an update.
This function won't yet exist when updating from 2.7 [sic].

fixes #25682 for trunk.

Built from https://develop.svn.wordpress.org/trunk@25893


git-svn-id: http://core.svn.wordpress.org/trunk@25805 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 18:18:12 +00:00
Andrew Nacin
0976999929 Remove debug code from WP_Automatic_Updater::send_email().
props markmcwilliams for initial patch.
see #25678.

Built from https://develop.svn.wordpress.org/trunk@25891


git-svn-id: http://core.svn.wordpress.org/trunk@25803 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-24 01:51:09 +00:00
Andrew Nacin
7b772e5c58 Introduce a send_core_update_notification_email filter to control whether to send update notifications.
Currently, this is dependent on whether the automatic updater is enabled (generally). This is likely to be decoupled in a future release.

This refocuses the auto_core_update_send_email filter to specifically be for success/fail emails for auto updates, while the new filter is more general.

see #25603.

Built from https://develop.svn.wordpress.org/trunk@25882


git-svn-id: http://core.svn.wordpress.org/trunk@25794 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-23 19:47:09 +00:00
Ryan Boren
b87d4b77e5 Pinking shears
Built from https://develop.svn.wordpress.org/trunk@25880


git-svn-id: http://core.svn.wordpress.org/trunk@25792 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-23 14:38:10 +00:00
Andrew Nacin
a387c3bef9 Make some changes to the email templates to account for the fact that an auto update offer might not be to the latest version.
For example, 3.7.2 install is served a 3.7.3 update, but the current version is 3.8.1.

This commit also allows for core update notification emails to be sent even when we are unable to run an auto update due to filesystem configuration (VCS checkout or file permissions). But, since these emails go through WP_Automatic_Updater, they will not be sent if the updater is outright disabled.

fixes #25654.

Built from https://develop.svn.wordpress.org/trunk@25873


git-svn-id: http://core.svn.wordpress.org/trunk@25785 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 21:19:09 +00:00
Andrew Nacin
58c18f0c32 Show the nag we show for a stuck .maintenance file when an auto update failed.
see #25654.

Built from https://develop.svn.wordpress.org/trunk@25872


git-svn-id: http://core.svn.wordpress.org/trunk@25784 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 21:15:09 +00:00
Andrew Nacin
13dd29126a "some files" instead of "certain files". Less stuffy.
props markjaquith.
see #25652.

Built from https://develop.svn.wordpress.org/trunk@25871


git-svn-id: http://core.svn.wordpress.org/trunk@25783 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 18:41:10 +00:00
Andrew Nacin
fabf119cf3 New, better error message when we realize we won't be able to copy a file and continue with the update.
fixes #25652.

Built from https://develop.svn.wordpress.org/trunk@25870


git-svn-id: http://core.svn.wordpress.org/trunk@25782 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 18:21:10 +00:00
Andrew Nacin
d5fdd66f9d Only enforce disk free space checks when doing background updates.
see #25652.

Built from https://develop.svn.wordpress.org/trunk@25869


git-svn-id: http://core.svn.wordpress.org/trunk@25781 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 18:18:09 +00:00
Andrew Nacin
74488bdcb0 Spell out duplicate hook locations.
props DrewAPicture.
fixes #25658.

Built from https://develop.svn.wordpress.org/trunk@25868


git-svn-id: http://core.svn.wordpress.org/trunk@25780 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 17:22:11 +00:00
Andrew Nacin
a160441c81 Updates: Disable maintenance mode once we've finished copying files, to minimize disruption.
props dd32.
fixes #25655.

Built from https://develop.svn.wordpress.org/trunk@25866


git-svn-id: http://core.svn.wordpress.org/trunk@25778 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 17:20:10 +00:00
Andrew Nacin
097c0fd0b6 Updates: Saner stats and rollback handling. WP.org now collects basic stats on non-auto updates as they have been hugely informative.
props dd32 for initial patch.
fixes #25657.

Built from https://develop.svn.wordpress.org/trunk@25863


git-svn-id: http://core.svn.wordpress.org/trunk@25775 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 09:49:09 +00:00
Andrew Nacin
64bd5aa564 Move upgrader_process_complete for core to its proper place in Core_Upgrader.
This means it will be firing as a JS redirect is taking place if the update is from pre-3.4. Acceptable.

props dd32.
fixes #25659.

Built from https://develop.svn.wordpress.org/trunk@25861


git-svn-id: http://core.svn.wordpress.org/trunk@25773 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-22 04:37:09 +00:00
Andrew Nacin
5a0b227316 Rename the automatic_updates_send_email filter to auto_core_update_send_email. (Final name change.)
fixes #25653. Also:
 * Fully document all new hooks, methods, and classes in the upgrader.
 * Rename 'language' to 'translation' inside the upgrader.
 * Improve the readability of the crazy do-while loop in the is_vcs_checkout() method.

Built from https://develop.svn.wordpress.org/trunk@25859


git-svn-id: http://core.svn.wordpress.org/trunk@25771 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-21 22:29:09 +00:00
Andrew Nacin
ee489a2e81 Commit [25823] should not have renamed AUTOMATIC_UPDATER_DISABLED to AUTOMATIC_UPDATES_DISABLED.
The proper constant is AUTOMATIC_UPDATER_DISABLED. Keep the filter in line with that too.

see #22704.

Built from https://develop.svn.wordpress.org/trunk@25851


git-svn-id: http://core.svn.wordpress.org/trunk@25763 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-18 21:24:10 +00:00
Andrew Nacin
c00bba9e8b Use correct variable. fixes #10787.
Built from https://develop.svn.wordpress.org/trunk@25843


git-svn-id: http://core.svn.wordpress.org/trunk@25755 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-18 17:16:10 +00:00
Andrew Nacin
ee20af1fad Notify administrators of successful, failed, and pending core updates.
Blocks future background updates after critical failures, but allow retries in certain situations. More in the ticket.

fixes #10787.

Built from https://develop.svn.wordpress.org/trunk@25841


git-svn-id: http://core.svn.wordpress.org/trunk@25753 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-18 16:30:11 +00:00
Andrew Nacin
859da01c4a Delete expired transients on database upgrades.
Reverts [25416], which had all transients being cleared. This leaves much to be desired, but we don't want a core update to be blamed for breaking a site that incorrectly assumes transients aren't transient.

props dartiss, pento.
fixes #20316.

Built from https://develop.svn.wordpress.org/trunk@25838


git-svn-id: http://core.svn.wordpress.org/trunk@25750 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-18 07:48:09 +00:00
Andrew Nacin
5f3e90a112 Introduce email templates for automatic background updates.
The four templates are:
 1. We successfully updated their site. If any of their themes or plugins are out of date, it also mentions that. ('success')
 2. We are not configured to update their site, so we notify them of the new release. ('notify')
 3. We tried but failed to update their site. The error was early in the process, so no harm, no foul. This is the same as template #2, plus one sentence. ('fail')
 4. We tried to update their site, and failed while copying files. ('critical')

With assistance from markjaquith.

see #10787.

Built from https://develop.svn.wordpress.org/trunk@25837


git-svn-id: http://core.svn.wordpress.org/trunk@25749 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-18 06:33:10 +00:00
Andrew Nacin
325ccd0a14 set_current_screen() is now unnecessary in Automatic_Upgrader_Skin, which is good because it breaks things in the network admin.
fixes #25622.

Built from https://develop.svn.wordpress.org/trunk@25836


git-svn-id: http://core.svn.wordpress.org/trunk@25748 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-17 23:24:09 +00:00
Andrew Nacin
a65661abee In automatic background updates, standardize on 'update'.
New, final filter names:
 * auto_update_{$type} (plugin, theme, core, language)
 * automatic_updates_is_vcs_checkout
 * automatic_updates_disabled

New class name is WP_Automatic_Updater. Method names include update() and should_update().

see #22704.

Built from https://develop.svn.wordpress.org/trunk@25835


git-svn-id: http://core.svn.wordpress.org/trunk@25747 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-17 23:21:10 +00:00
Dion Hulse
924e35d66a Silence PHP warnings from disk_free_space(). disk_free_space() will produce a warning in error conditions in addition to returning false, this includes a case where the bytes free is greater than PHP_INT_MAX (which is a error condition we don't need to check).
See #25576, #22704

Built from https://develop.svn.wordpress.org/trunk@25831


git-svn-id: http://core.svn.wordpress.org/trunk@25743 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-17 18:40:10 +00:00
Dion Hulse
1c8d882e13 For Background updates, ensure that only one update process runs at the same time by using the options table as a lock.
This prevents multiple cron spawns and/or long-running updates from causing multiple update processes to spin up.
This also fixes a case where the upgrader might kick in for ( ! is_main_network() || ! is_main_site() ) in mulisite installs.
See #22704

Built from https://develop.svn.wordpress.org/trunk@25828


git-svn-id: http://core.svn.wordpress.org/trunk@25740 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-17 05:24:09 +00:00
Andrew Nacin
9432acde4e Remove the old wp_auto_updates_maybe_update cron event. Schedule the new wp_maybe_auto_update event at 7 a.m. and 7 p.m. in the site's timezone.
see #27704.

Built from https://develop.svn.wordpress.org/trunk@25825


git-svn-id: http://core.svn.wordpress.org/trunk@25737 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-17 04:02:09 +00:00
Andrew Nacin
191efaef61 Make WP_Automatic_Upgrader a proper object that gets instantiated. Renames nearly all of its methods.
Also renames wp_auto_updates_maybe_update() to wp_maybe_auto_update().

see #22704.

Built from https://develop.svn.wordpress.org/trunk@25823


git-svn-id: http://core.svn.wordpress.org/trunk@25735 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-17 00:55:09 +00:00
Dion Hulse
640f73ecd2 Remove a duplicate semicolon that snuck in. Props JustinSainton. See #18200
Built from https://develop.svn.wordpress.org/trunk@25822


git-svn-id: http://core.svn.wordpress.org/trunk@25734 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-17 00:12:10 +00:00
Dion Hulse
376a0a55c7 Allow the WordPress.org Language update API to disallow automated background updates for a specific language pack. See #18200
Built from https://develop.svn.wordpress.org/trunk@25818


git-svn-id: http://core.svn.wordpress.org/trunk@25730 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-16 22:27:09 +00:00
Dion Hulse
ed07bab4b4 When a plugin enables Background Plugin updates, don't deactivate the plugin during update as we require a browser to reactivate it afterwards. See #22704
Built from https://develop.svn.wordpress.org/trunk@25817


git-svn-id: http://core.svn.wordpress.org/trunk@25729 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-16 19:48:10 +00:00
Andrew Nacin
bccefbbd83 Merge the should_auto_update() and can_auto_update() methods. see #22704.
Built from https://develop.svn.wordpress.org/trunk@25815


git-svn-id: http://core.svn.wordpress.org/trunk@25727 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-16 19:35:09 +00:00
Dion Hulse
085f5c5fb9 Fix a issue where the translation name isn't showing up in the Background Update emails, caused by a PHP Warning/missing variable in [25806]. See #18200
Built from https://develop.svn.wordpress.org/trunk@25812


git-svn-id: http://core.svn.wordpress.org/trunk@25724 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-16 17:07:08 +00:00
Dion Hulse
8c35982ae8 Avoid a few PHP Warnings when files don't exist and use a better method to locate the local filepath.
See #18201

Built from https://develop.svn.wordpress.org/trunk@25811


git-svn-id: http://core.svn.wordpress.org/trunk@25723 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-16 15:20:10 +00:00
Andrew Nacin
ba0ebf3736 Include translations in the update bubbles (as +1 if there are any). see #18200.
Built from https://develop.svn.wordpress.org/trunk@25810


git-svn-id: http://core.svn.wordpress.org/trunk@25722 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-16 14:34:10 +00:00
Dion Hulse
84cec7b526 Remove the no longer used Headerless_Upgrader_Skin class, it's been replaced by Language_Pack_Upgrader_Skin.
See #18200, [25806]

Built from https://develop.svn.wordpress.org/trunk@25807


git-svn-id: http://core.svn.wordpress.org/trunk@25719 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-16 04:19:09 +00:00
Dion Hulse
1c8e79353a Language Packs: Many many fixes such as:
- Add a "Update Translations" stand-alone button to the updates page
- Shift Language feedback to before update process completion action links & limit the verbosity of output (name + success/errors)
- Simplify/combine the language update descriptive string to only include a plugin/theme name
- Properly handle cache clearing after language updates to prevent langs being repeditively updated
- Display a "All items up to date" string when there's nothing to do
- Reduce the 'Connection Information' from a <h2> to a <h3> to remove duplicate h2's and screen icons from update screens
- Fix the Direct filesystem method not being used for Language updates because WP_LANG_DIR doesn't exist (check it's parent for writable instead)
See #18200, #22704


Built from https://develop.svn.wordpress.org/trunk@25806


git-svn-id: http://core.svn.wordpress.org/trunk@25718 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-16 04:15:09 +00:00
Andrew Nacin
9fe39c464a Avoid numerous potential PHP warnings when dealing with the pre-r25801 get_core_checksums() return value.
Warnings included current(), filestat(), and md5_file().

see #18201. see #22704.

Built from https://develop.svn.wordpress.org/trunk@25805


git-svn-id: http://core.svn.wordpress.org/trunk@25717 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-16 04:02:09 +00:00
Andrew Nacin
4542fbb2ae Significantly simplify get_core_checksums(), as the caching and chunking was causing too much grief.
Make sure we only do our pre-flight is_writable check when the file exists.

see #18201. see #22704.

Built from https://develop.svn.wordpress.org/trunk@25801


git-svn-id: http://core.svn.wordpress.org/trunk@25713 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-15 23:03:10 +00:00
Andrew Nacin
9507d22243 Use correct variable. see #22704.
Built from https://develop.svn.wordpress.org/trunk@25800


git-svn-id: http://core.svn.wordpress.org/trunk@25712 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-15 22:07:09 +00:00
Andrew Nacin
95831a8a67 Remove accidental debug cruft in [25780]. see #22704.
Built from https://develop.svn.wordpress.org/trunk@25799


git-svn-id: http://core.svn.wordpress.org/trunk@25711 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-15 21:24:09 +00:00
Andrew Nacin
2100fa65fd Avoid our pre-flight writable checks if get_core_checksums() doesn't exist yet.
Thus, it will not work for 3.6 => 3.7, only 3.7+.

see #22704.

Built from https://develop.svn.wordpress.org/trunk@25798


git-svn-id: http://core.svn.wordpress.org/trunk@25710 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-15 20:35:10 +00:00
Andrew Nacin
a6188bc84a Only add error data to the files_not_writable WP_Error if the install already has [25775] and [25796] applied.
see #22704.

Built from https://develop.svn.wordpress.org/trunk@25797


git-svn-id: http://core.svn.wordpress.org/trunk@25709 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-15 20:01:09 +00:00
Andrew Nacin
82547b21b6 In show_message(), only print error data if it is a string.
see #25576, [25775].

Built from https://develop.svn.wordpress.org/trunk@25796


git-svn-id: http://core.svn.wordpress.org/trunk@25708 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-15 19:51:10 +00:00
Andrew Nacin
26c03ea5fb Core Updates: Verify that all files we're about to copy are actually writable, when using the direct transport.
Once we begin to copy core files, all bets are off. This allows us to fail early when we'll otherwise need to stop midway through due to permissions issues, which is a particularly bad problem when only some files have permissions issues.

see #22704.

Built from https://develop.svn.wordpress.org/trunk@25794


git-svn-id: http://core.svn.wordpress.org/trunk@25706 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-15 19:18:10 +00:00
Andrew Nacin
eeaad19a26 Use FS_CHMOD_FILE rather than an explicit 0644 in copy_dir() and _copy_dir().
This occurs when we can't copy a file. We chmod it and try again.

see #22704.

Built from https://develop.svn.wordpress.org/trunk@25793


git-svn-id: http://core.svn.wordpress.org/trunk@25705 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-15 19:14:10 +00:00
Dion Hulse
592123951b Fix a misspelling of the filter we're checking for, s/fs_method/filesystem_method/.
My bad. See #22704, [25781].

Built from https://develop.svn.wordpress.org/trunk@25787


git-svn-id: http://core.svn.wordpress.org/trunk@25699 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-15 14:55:09 +00:00
Andrew Nacin
e503d0e2ec Hide auto updates from update-core.php directly in get_core_updates(). see #22704.
Built from https://develop.svn.wordpress.org/trunk@25783


git-svn-id: http://core.svn.wordpress.org/trunk@25696 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-15 05:07:10 +00:00
Andrew Nacin
957df34182 Automatic updates: An error code containing 'do_rollback' can be used to trigger a rollback.
This could enable the triggering of a rollback in update_core() in wp-admin/includes/update-core.php.

see #22704.

Built from https://develop.svn.wordpress.org/trunk@25782


git-svn-id: http://core.svn.wordpress.org/trunk@25695 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-15 02:59:10 +00:00
Andrew Nacin
cdede88a23 Automatic updates: Include error data in the follow-up API request.
props dd32.
see #22704.

Built from https://develop.svn.wordpress.org/trunk@25781


git-svn-id: http://core.svn.wordpress.org/trunk@25694 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-14 23:33:10 +00:00
Andrew Nacin
9b56d4d11f Parse absolute paths out of error data. see #22704.
Built from https://develop.svn.wordpress.org/trunk@25780


git-svn-id: http://core.svn.wordpress.org/trunk@25693 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-14 22:25:08 +00:00
Dion Hulse
4dcca90887 Remove PHP4 compat code from the ZipArchive unzip handler, and pass the failure reason into the WP_Error return.
See #22704

Built from https://develop.svn.wordpress.org/trunk@25779


git-svn-id: http://core.svn.wordpress.org/trunk@25692 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-14 21:55:09 +00:00
Andrew Nacin
4fa3687e6a Account for the possible failure of disk_free_space() in update_core().
see #22704, #25576.

Built from https://develop.svn.wordpress.org/trunk@25778


git-svn-id: http://core.svn.wordpress.org/trunk@25691 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-14 21:15:10 +00:00
Andrew Nacin
3e3c085db3 Auto updates: Only attempt a roll back when we've hit a critical error code.
Specifically, this means when we've failed in copying files.

see #22704.

Built from https://develop.svn.wordpress.org/trunk@25777


git-svn-id: http://core.svn.wordpress.org/trunk@25690 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-14 21:03:09 +00:00
Andrew Nacin
145dbde82f Account for possible failures by disk_free_space(), as well as the potential need to copy the unzipped files.
see #25576.

Built from https://develop.svn.wordpress.org/trunk@25776


git-svn-id: http://core.svn.wordpress.org/trunk@25689 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-14 20:58:09 +00:00
Andrew Nacin
1516b990f1 In the upgrader, only print additional error data if it is a string.
As in [25576], we sometimes want to return additional data that is not necessarily meant for UI consumption.

see #25576.

Built from https://develop.svn.wordpress.org/trunk@25775


git-svn-id: http://core.svn.wordpress.org/trunk@25688 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-14 20:20:10 +00:00
Andrew Nacin
d68a80217f In unzip_file(), confirm we have enough available disk space before extracting.
"enough" is calculated by adding up the uncompressed size of the files in the archive, then adding a 20% buffer.

props dd32.
fixes #25576.

Built from https://develop.svn.wordpress.org/trunk@25774


git-svn-id: http://core.svn.wordpress.org/trunk@25687 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-14 20:15:09 +00:00
Andrew Nacin
2d898df04f More specific error codes in the core upgrader when copying language, plugin, and theme files. see #22704.
Built from https://develop.svn.wordpress.org/trunk@25772


git-svn-id: http://core.svn.wordpress.org/trunk@25685 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-14 19:38:10 +00:00
Andrew Nacin
4c90c3cb31 Add explicit link to the installation being updated in debugging emails. see #22704.
Built from https://develop.svn.wordpress.org/trunk@25770


git-svn-id: http://core.svn.wordpress.org/trunk@25683 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-12 20:18:10 +00:00
Andrew Nacin
de1d3c8261 Silence possible warnings from is_dir(). fixes #25572.
Built from https://develop.svn.wordpress.org/trunk@25764


git-svn-id: http://core.svn.wordpress.org/trunk@25677 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-11 17:11:10 +00:00
Andrew Nacin
29f5f5b5fd Refine error codes throughout the upgrader so we can better detect at what stage updates fail.
see #22704.

Built from https://develop.svn.wordpress.org/trunk@25763


git-svn-id: http://core.svn.wordpress.org/trunk@25676 1a063a9b-81f0-0310-95a4-ce76da25c4cd
2013-10-11 16:06:11 +00:00