summaryrefslogtreecommitdiffstats
path: root/wp-admin/revision.php
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-09-19 04:51:18 +0000
commit0e41b5d52fdc6af6442816b5f465c9db9f84e126 (patch)
treee139a90049b158d4eed892d1662ee7f5c358fa31 /wp-admin/revision.php
parentAdding upstream version 6.5.5+dfsg1. (diff)
downloadwordpress-upstream.tar.xz
wordpress-upstream.zip
Adding upstream version 6.6.1+dfsg1.upstream/6.6.1+dfsg1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to '')
-rw-r--r--wp-admin/revision.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/wp-admin/revision.php b/wp-admin/revision.php
index 72b8e74..12ec2b6 100644
--- a/wp-admin/revision.php
+++ b/wp-admin/revision.php
@@ -21,14 +21,16 @@ require ABSPATH . 'wp-admin/includes/revision.php';
* @global int $from The revision to compare from.
* @global int $to Optional, required if revision missing. The revision to compare to.
*/
-wp_reset_vars( array( 'revision', 'action', 'from', 'to' ) );
-$revision_id = absint( $revision );
+$revision_id = ! empty( $_REQUEST['revision'] ) ? absint( $_REQUEST['revision'] ) : 0;
+$action = ! empty( $_REQUEST['action'] ) ? sanitize_text_field( $_REQUEST['action'] ) : '';
+$from = ! empty( $_REQUEST['from'] ) && is_numeric( $_REQUEST['from'] ) ? absint( $_REQUEST['from'] ) : null;
+$to = ! empty( $_REQUEST['to'] ) && is_numeric( $_REQUEST['to'] ) ? absint( $_REQUEST['to'] ) : null;
-$from = is_numeric( $from ) ? absint( $from ) : null;
if ( ! $revision_id ) {
- $revision_id = absint( $to );
+ $revision_id = $to;
}
+
$redirect = 'edit.php';
switch ( $action ) {