Changeset 2997941
- Timestamp:
- 11/17/2023 10:43:55 PM (2 years ago)
- File:
-
- 1 edited
-
user-avatar/tags/1.4.2/user-avatar.php (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
user-avatar/tags/1.4.2/user-avatar.php
r2996064 r2997941 143 143 global $current_user; 144 144 145 if(($_GET['uid'] == $current_user->ID || current_user_can('edit_users')) && is_numeric($_GET['uid'])) 145 $uid = absint( $_GET['uid'] ); 146 $step = absint( $_GET['step'] ); 147 148 if(($uid == $current_user->ID || current_user_can('edit_users')) && is_numeric($uid)) 146 149 { 147 $uid = absint( $_GET['uid'] );148 150 149 151 ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> 150 152 <html xmlns="http://www.w3.org/1999/xhtml" <?php do_action('admin_xml_ns'); ?> <?php language_attributes(); ?>> 151 153 <head> 152 <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php echo get_option('blog_charset'); ?>" />153 <title><?php bloginfo('name') ?> › <?php _e('Uploads'); ?> — <?php _e('WordPress'); ?></title>154 <meta http-equiv="Content-Type" content="<?php esc_attr( bloginfo('html_type') ); ?>; charset=<?php echo esc_attr( get_option('blog_charset') ); ?>" /> 155 <title><?php esc_textarea( bloginfo('name') ) ?> › <?php _e('Uploads'); ?> — <?php _e('WordPress'); ?></title> 154 156 <script type="text/javascript"> 155 157 //<![CDATA[ … … 180 182 <body> 181 183 <?php 182 $step = absint( $_GET['step'] ); 184 183 185 switch($step) 184 186 { … … 397 399 $width = floatval( $_POST['width'] ); 398 400 $height = floatval( $_POST['height'] ); 401 $uid = intval( $uid ); 399 402 400 403 if ( $oitar > 1 ) { … … 633 636 634 637 $user_id = absint( $_GET['user_id'] ); 638 $u = absint( $_GET['u'] ); 635 639 636 640 // If user clicks the remove avatar button, in URL deleter_avatar=true 637 if( isset($_GET['delete_avatar']) && wp_verify_nonce($_GET['_nononce'], 'user_avatar') && ( $ _GET['u']== $current_user->id || current_user_can('edit_users')) )641 if( isset($_GET['delete_avatar']) && wp_verify_nonce($_GET['_nononce'], 'user_avatar') && ( $u == $current_user->id || current_user_can('edit_users')) ) 638 642 { 639 $user_id = $_GET['user_id'];640 643 if(is_numeric($user_id)) 641 644 $user_id = "?user_id=".$user_id; 642 645 643 user_avatar_delete_files( (int) $_GET['u']);646 user_avatar_delete_files(absint( $u )); 644 647 wp_redirect(get_option('siteurl') . '/wp-admin/'. $pagenow. $user_id); 645 648
Note: See TracChangeset
for help on using the changeset viewer.