Ticket #16909: 16909.patch
File 16909.patch, 9.9 KB (added by , 14 years ago) |
---|
-
wp-admin/comment.php
### Eclipse Workspace Patch 1.0 #P wordpress-trunk
82 82 $comment_id = absint( $_GET['c'] ); 83 83 84 84 if ( !$comment = get_comment_to_edit( $comment_id ) ) { 85 wp_redirect( admin_url('edit-comments.php?error=1') );85 wp_redirect( self_admin_url('edit-comments.php?error=1') ); 86 86 die(); 87 87 } 88 88 89 89 if ( !current_user_can( 'edit_comment', $comment->comment_ID ) ) { 90 wp_redirect( admin_url('edit-comments.php?error=2') );90 wp_redirect( self_admin_url('edit-comments.php?error=2') ); 91 91 die(); 92 92 } 93 93 94 94 // No need to re-approve/re-trash/re-spam a comment. 95 95 if ( $action == str_replace( '1', 'approve', $comment->comment_approved ) ) { 96 wp_redirect( admin_url( 'edit-comments.php?same=' . $comment_id ) );96 wp_redirect( self_admin_url( 'edit-comments.php?same=' . $comment_id ) ); 97 97 die(); 98 98 } 99 99 -
wp-admin/update-core.php
444 444 } elseif ( isset( $_POST['checked'] ) ) { 445 445 $plugins = (array) $_POST['checked']; 446 446 } else { 447 wp_redirect( admin_url('update-core.php') );447 wp_redirect( self_admin_url('update-core.php') ); 448 448 exit; 449 449 } 450 450 … … 472 472 } elseif ( isset( $_POST['checked'] ) ) { 473 473 $themes = (array) $_POST['checked']; 474 474 } else { 475 wp_redirect( admin_url('update-core.php') );475 wp_redirect( self_admin_url('update-core.php') ); 476 476 exit; 477 477 } 478 478 -
wp-admin/themes.php
18 18 if ( 'activate' == $_GET['action'] ) { 19 19 check_admin_referer('switch-theme_' . $_GET['template']); 20 20 switch_theme($_GET['template'], $_GET['stylesheet']); 21 wp_redirect( admin_url('themes.php?activated=true') );21 wp_redirect( self_admin_url('themes.php?activated=true') ); 22 22 exit; 23 23 } elseif ( 'delete' == $_GET['action'] ) { 24 24 check_admin_referer('delete-theme_' . $_GET['template']); 25 25 if ( !current_user_can('delete_themes') ) 26 26 wp_die( __( 'Cheatin’ uh?' ) ); 27 27 delete_theme($_GET['template']); 28 wp_redirect( admin_url('themes.php?deleted=true') );28 wp_redirect( self_admin_url('themes.php?deleted=true') ); 29 29 exit; 30 30 } 31 31 } -
wp-admin/update.php
70 70 71 71 check_admin_referer('activate-plugin_' . $plugin); 72 72 if ( ! isset($_GET['failure']) && ! isset($_GET['success']) ) { 73 wp_redirect( admin_url('update.php?action=activate-plugin&failure=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce']) );73 wp_redirect( self_admin_url('update.php?action=activate-plugin&failure=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce']) ); 74 74 activate_plugin( $plugin, '', ! empty( $_GET['networkwide'] ), true ); 75 wp_redirect( admin_url('update.php?action=activate-plugin&success=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce']) );75 wp_redirect( self_admin_url('update.php?action=activate-plugin&success=true&plugin=' . $plugin . '&_wpnonce=' . $_GET['_wpnonce']) ); 76 76 die(); 77 77 } 78 78 iframe_header( __('Plugin Reactivation'), true ); -
wp-admin/user/admin.php
12 12 require_once( dirname(dirname(__FILE__)) . '/admin.php'); 13 13 14 14 if ( ! is_multisite() ) { 15 wp_redirect( admin_url() );15 wp_redirect( self_admin_url() ); 16 16 exit; 17 17 } 18 18 -
wp-admin/media.php
48 48 $errors = null; 49 49 50 50 if ( empty( $_GET['attachment_id'] ) ) { 51 wp_redirect( admin_url('upload.php') );51 wp_redirect( self_admin_url('upload.php') ); 52 52 exit(); 53 53 } 54 54 $att_id = (int) $_GET['attachment_id']; … … 128 128 exit; 129 129 130 130 default: 131 wp_redirect( admin_url('upload.php') );131 wp_redirect( self_admin_url('upload.php') ); 132 132 exit; 133 133 134 134 endswitch; -
wp-admin/import.php
37 37 ); 38 38 39 39 if ( ! empty( $_GET['invalid'] ) && !empty($popular_importers[$_GET['invalid']][3]) ) { 40 wp_redirect( admin_url('import.php?import=' . $popular_importers[$_GET['invalid']][3]) );40 wp_redirect( self_admin_url('import.php?import=' . $popular_importers[$_GET['invalid']][3]) ); 41 41 exit; 42 42 } 43 43 -
wp-admin/media-upload.php
54 54 if ( $errors ) 55 55 $location .= '?message=3'; 56 56 57 wp_redirect( admin_url($location) );57 wp_redirect( self_admin_url($location) ); 58 58 exit; 59 59 } 60 60 -
wp-admin/post.php
139 139 $editing = true; 140 140 141 141 if ( empty( $post_id ) ) { 142 wp_redirect( admin_url('post.php') );142 wp_redirect( self_admin_url('post.php') ); 143 143 exit(); 144 144 } 145 145 … … 269 269 break; 270 270 271 271 default: 272 wp_redirect( admin_url('edit.php') );272 wp_redirect( self_admin_url('edit.php') ); 273 273 exit(); 274 274 break; 275 275 } // end switch -
wp-admin/edit.php
29 29 // Back-compat for viewing comments of an entry 30 30 foreach ( array( 'p', 'attachment_id', 'page_id' ) as $_redirect ) { 31 31 if ( ! empty( $_REQUEST[ $_redirect ] ) ) { 32 wp_redirect( admin_url( 'edit-comments.php?p=' . absint( $_REQUEST[ $_redirect ] ) ) );32 wp_redirect( self_admin_url( 'edit-comments.php?p=' . absint( $_REQUEST[ $_redirect ] ) ) ); 33 33 exit; 34 34 } 35 35 } -
wp-admin/network/edit.php
14 14 wp_die( __( 'Multisite support is not enabled.' ) ); 15 15 16 16 if ( empty( $_GET['action'] ) ) { 17 wp_redirect( admin_url( 'index.php' ) );17 wp_redirect( self_admin_url( 'index.php' ) ); 18 18 exit; 19 19 } 20 20 -
wp-admin/moderation.php
8 8 * @subpackage Administration 9 9 */ 10 10 require_once('../wp-load.php'); 11 wp_redirect( admin_url('edit-comments.php?comment_status=moderated') );11 wp_redirect( self_admin_url('edit-comments.php?comment_status=moderated') ); 12 12 exit; 13 13 ?> -
wp-admin/options.php
41 41 delete_option( 'new_admin_email' ); 42 42 $redirect = 'options-general.php?updated=true'; 43 43 } 44 wp_redirect( admin_url( $redirect ) );44 wp_redirect( self_admin_url( $redirect ) ); 45 45 exit; 46 46 } elseif ( ! empty( $_GET['dismiss'] ) && 'new_admin_email' == $_GET['dismiss'] ) { 47 47 delete_option( 'adminhash' ); 48 48 delete_option( 'new_admin_email' ); 49 wp_redirect( admin_url( 'options-general.php?updated=true' ) );49 wp_redirect( self_admin_url( 'options-general.php?updated=true' ) ); 50 50 exit; 51 51 } 52 52 } -
wp-admin/admin.php
41 41 do_action('after_db_upgrade'); 42 42 } elseif ( get_option('db_version') != $wp_db_version ) { 43 43 if ( !is_multisite() ) { 44 wp_redirect( admin_url('upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI']))));44 wp_redirect( self_admin_url('upgrade.php?_wp_http_referer=' . urlencode(stripslashes($_SERVER['REQUEST_URI'])))); 45 45 exit; 46 46 } elseif ( apply_filters( 'do_mu_upgrade', true ) ) { 47 47 /** … … 124 124 $query_string = $_SERVER[ 'QUERY_STRING' ]; 125 125 else 126 126 $query_string = 'page=' . $plugin_page; 127 wp_redirect( admin_url('tools.php?' . $query_string) );127 wp_redirect( self_admin_url('tools.php?' . $query_string) ); 128 128 exit; 129 129 } 130 130 } … … 179 179 wp_die(__('You are not allowed to import.')); 180 180 181 181 if ( validate_file($importer) ) { 182 wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );182 wp_redirect( self_admin_url( 'import.php?invalid=' . $importer ) ); 183 183 exit; 184 184 } 185 185 186 186 // Allow plugins to define importers as well 187 187 if ( !isset($wp_importers) || !isset($wp_importers[$importer]) || ! is_callable($wp_importers[$importer][2])) { 188 188 if (! file_exists(ABSPATH . "wp-admin/import/$importer.php")) { 189 wp_redirect( admin_url( 'import.php?invalid=' . $importer ) );189 wp_redirect( self_admin_url( 'import.php?invalid=' . $importer ) ); 190 190 exit; 191 191 } 192 192 include(ABSPATH . "wp-admin/import/$importer.php"); -
wp-admin/widgets.php
175 175 if ( isset($_POST['removewidget']) && $_POST['removewidget'] ) { 176 176 177 177 if ( !in_array($widget_id, $sidebar, true) ) { 178 wp_redirect( admin_url('widgets.php?error=0') );178 wp_redirect( self_admin_url('widgets.php?error=0') ); 179 179 exit; 180 180 } 181 181 … … 208 208 } 209 209 210 210 wp_set_sidebars_widgets($sidebars_widgets); 211 wp_redirect( admin_url('widgets.php?message=0') );211 wp_redirect( self_admin_url('widgets.php?message=0') ); 212 212 exit; 213 213 } 214 214