Ticket #49239: ms-delete-site.php.patch
| File ms-delete-site.php.patch, 1.0 KB (added by , 6 years ago) |
|---|
-
ms-delete-site.php
17 17 wp_die( __( 'Sorry, you are not allowed to delete this site.' ) ); 18 18 } 19 19 20 if ( isset( $_GET['h'] ) && $_GET['h'] != '' && get_option( 'delete_blog_hash' ) != false) {20 if ( isset( $_GET['h'] ) && $_GET['h'] != '' && false !== get_option( 'delete_blog_hash' ) ) { 21 21 if ( hash_equals( get_option( 'delete_blog_hash' ), $_GET['h'] ) ) { 22 22 wpmu_delete_blog( get_current_blog_id() ); 23 23 wp_die( … … 42 42 echo '<div class="wrap">'; 43 43 echo '<h1>' . esc_html( $title ) . '</h1>'; 44 44 45 if ( isset( $_POST['action'] ) && $_POST['action'] == 'deleteblog' && isset( $_POST['confirmdelete'] ) && $_POST['confirmdelete']== '1' ) {45 if ( isset( $_POST['action'] ) && 'deleteblog' === $_POST['action'] && isset( $_POST['confirmdelete'] ) && $_POST['confirmdelete'] === '1' ) { 46 46 check_admin_referer( 'delete-blog' ); 47 47 48 48 $hash = wp_generate_password( 20, false );