From 572a9cb48876c3ce13f4fdeb47704bf5d2bdd120 Mon Sep 17 00:00:00 2001 From: Dominik Schilling Date: Fri, 5 Aug 2016 19:28:30 +0000 Subject: [PATCH] Update/Install: Replace "error" and "-1" failure messages with a more meaningful one. * "-1" is an invalid nonce error, show 'An error has occurred. Please reload the page and try again.'. * "error" means that the connection to the server was lost, show 'Connection lost or the server is busy. Please try again later.'. * Escape the message in `wp-updates-admin-notice` because the response may include HTML. * Remove HTML tags in `wp.updates.isValidResponse()` to make PHP's error messages more readable. Props azaozz for review. Fixes #37583. Built from https://develop.svn.wordpress.org/trunk@38205 git-svn-id: http://core.svn.wordpress.org/trunk@38146 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/includes/update.php | 2 +- wp-admin/js/updates.js | 8 +++++++- wp-admin/js/updates.min.js | 4 ++-- wp-includes/script-loader.php | 2 ++ wp-includes/version.php | 2 +- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/wp-admin/includes/update.php b/wp-admin/includes/update.php index 74899e37cb..3bc11d8954 100644 --- a/wp-admin/includes/update.php +++ b/wp-admin/includes/update.php @@ -631,7 +631,7 @@ function maintenance_nag() { function wp_print_admin_notice_templates() { ?>