Networks and Sites: Fix issues processing additional fields displayed for the Sites list table.

This prevents a `The link you followed has expired.` error when using a filter and now uses `$_POST` instead of `$_GET` to capture all form values.

Props pbiron.
Fixes #45954.
Built from https://develop.svn.wordpress.org/trunk@46384


git-svn-id: http://core.svn.wordpress.org/trunk@46183 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
desrosj 2019-10-04 14:32:56 +00:00
parent c0bb073ca2
commit 143b5fd080
2 changed files with 8 additions and 4 deletions

View File

@ -231,9 +231,13 @@ if ( isset( $_GET['action'] ) ) {
wp_safe_redirect( $redirect_to ); wp_safe_redirect( $redirect_to );
exit(); exit();
} }
} elseif ( ! empty( $_GET['_wp_http_referer'] ) ) { } else {
// process query defined by WP_MS_Site_List_Table::extra_table_nav(). // Process query defined by WP_MS_Site_List_Table::extra_table_nav().
wp_redirect( remove_query_arg( array( '_wp_http_referer', '_wpnonce' ), wp_unslash( $_SERVER['REQUEST_URI'] ) ) ); $location = remove_query_arg(
array( '_wp_http_referer', '_wpnonce' ),
add_query_arg( $_POST, network_admin_url( 'sites.php' ) )
);
wp_redirect( $location );
exit; exit;
} }

View File

@ -13,7 +13,7 @@
* *
* @global string $wp_version * @global string $wp_version
*/ */
$wp_version = '5.3-beta2-46383'; $wp_version = '5.3-beta2-46384';
/** /**
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema. * Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.