Changeset 3928
- Timestamp:
- 06/27/2006 05:38:56 AM (18 years ago)
- Location:
- trunk
- Files:
-
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-admin/categories.php
r3804 r3928 32 32 wp_insert_category($_POST); 33 33 34 header('Location:categories.php?message=1#addcat');34 wp_redirect('categories.php?message=1#addcat'); 35 35 break; 36 36 … … 53 53 wp_delete_category($cat_ID); 54 54 55 header('Location:categories.php?message=2');55 wp_redirect('categories.php?message=2'); 56 56 57 57 break; … … 75 75 wp_update_category($_POST); 76 76 77 header('Location:categories.php?message=3');77 wp_redirect('categories.php?message=3'); 78 78 break; 79 79 -
trunk/wp-admin/comment.php
r3918 r3928 119 119 120 120 if ((wp_get_referer() != '') && (false == $noredir)) { 121 header('Location: ' .wp_get_referer());122 } else { 123 header('Location: '.get_settings('siteurl') .'/wp-admin/edit-comments.php');121 wp_redirect(wp_get_referer()); 122 } else { 123 wp_redirect(get_settings('siteurl') .'/wp-admin/edit-comments.php'); 124 124 } 125 125 exit(); … … 146 146 147 147 if ((wp_get_referer() != "") && (false == $noredir)) { 148 header('Location: ' .wp_get_referer());149 } else { 150 header('Location: '.get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');148 wp_redirect(wp_get_referer()); 149 } else { 150 wp_redirect(get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments'); 151 151 } 152 152 exit(); … … 177 177 178 178 if ((wp_get_referer() != "") && (false == $noredir)) { 179 header('Location: ' .wp_get_referer());180 } else { 181 header('Location: '.get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments');179 wp_redirect(wp_get_referer()); 180 } else { 181 wp_redirect(get_settings('siteurl') .'/wp-admin/edit.php?p='.$p.'&c=1#comments'); 182 182 } 183 183 exit(); … … 195 195 $referredby = $_POST['referredby']; 196 196 if (!empty($referredby)) { 197 header('Location: ' .$referredby);198 } else { 199 header ("Location:edit.php?p=$comment_post_ID&c=1#comments");197 wp_redirect($referredby); 198 } else { 199 wp_redirect("edit.php?p=$comment_post_ID&c=1#comments"); 200 200 } 201 201 -
trunk/wp-admin/import/blogger.php
r3769 r3928 26 26 function restart() { 27 27 delete_option('import-blogger'); 28 header("Location:admin.php?import=blogger");28 wp_redirect("admin.php?import=blogger"); 29 29 die(); 30 30 } … … 214 214 // Redirects to next step 215 215 function do_next_step() { 216 header("Location:admin.php?import=blogger&noheader=true&blog={$_GET['blog']}");216 wp_redirect("admin.php?import=blogger&noheader=true&blog={$_GET['blog']}"); 217 217 die(); 218 218 } … … 274 274 } 275 275 update_option('import-blogger', $this->import); 276 header("Location:admin.php?import=blogger&noheader=true&step=1");276 wp_redirect("admin.php?import=blogger&noheader=true&step=1"); 277 277 } 278 278 die(); -
trunk/wp-admin/inline-uploading.php
r3765 r3928 42 42 wp_delete_attachment($attachment); 43 43 44 header("Location: " .basename(__FILE__) ."?post=$post&all=$all&action=view&start=$start");44 wp_redirect(basename(__FILE__) ."?post=$post&all=$all&action=view&start=$start"); 45 45 die; 46 46 … … 103 103 } 104 104 105 header("Location: " .basename(__FILE__) . "?post=$post&all=$all&action=view&start=0");105 wp_redirect(basename(__FILE__) . "?post=$post&all=$all&action=view&start=0"); 106 106 die(); 107 107 … … 142 142 143 143 if ( count($attachments) == 0 ) { 144 header("Location: " .basename(__FILE__) ."?post=$post&action=upload" );144 wp_redirect( basename(__FILE__) ."?post=$post&action=upload" ); 145 145 die; 146 146 } elseif ( count($attachments) > $num ) { -
trunk/wp-admin/link.php
r3918 r3928 38 38 //for each link id (in $linkcheck[]) change category to selected value 39 39 if (count($linkcheck) == 0) { 40 header('Location: '.$this_file);40 wp_redirect($this_file); 41 41 exit; 42 42 } … … 50 50 } 51 51 52 header("Location:$this_file?deleted=$deleted");52 wp_redirect("$this_file?deleted=$deleted"); 53 53 break; 54 54 … … 62 62 //for each link id (in $linkcheck[]) change category to selected value 63 63 if (count($linkcheck) == 0) { 64 header('Location: '.$this_file);64 wp_redirect($this_file); 65 65 exit; 66 66 } … … 69 69 //$q = $wpdb->query("update $wpdb->links SET link_category='$category' WHERE link_id IN ($all_links)"); 70 70 71 header('Location: '.$this_file);71 wp_redirect($this_file); 72 72 break; 73 73 … … 77 77 add_link(); 78 78 79 header('Location: '.wp_get_referer().'?added=true');79 wp_redirect(wp_get_referer().'?added=true'); 80 80 break; 81 81 -
trunk/wp-admin/moderation.php
r3847 r3928 71 71 72 72 $file = basename(__FILE__); 73 header("Location:$file?ignored=$item_ignored&deleted=$item_deleted&approved=$item_approved&spam=$item_spam");73 wp_redirect("$file?ignored=$item_ignored&deleted=$item_deleted&approved=$item_approved&spam=$item_spam"); 74 74 exit(); 75 75 -
trunk/wp-admin/page.php
r3918 r3928 50 50 $location = "page.php?action=edit&post=$page_ID"; 51 51 52 header("Location: $location");52 wp_redirect($location); 53 53 exit(); 54 54 break; … … 113 113 $location = 'page-new.php'; 114 114 } 115 header ('Location: ' .$location); // Send user on their way while we keep working115 wp_redirect($location); // Send user on their way while we keep working 116 116 117 117 exit(); … … 139 139 elseif (strstr($sendback, 'attachments.php')) $sendback = get_settings('siteurl') .'/wp-admin/attachments.php'; 140 140 $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); 141 header ('Location: ' .$sendback);141 wp_redirect($sendback); 142 142 exit(); 143 143 break; 144 144 145 145 default: 146 header('Location:edit-pages.php');146 wp_redirect('edit-pages.php'); 147 147 exit(); 148 148 break; -
trunk/wp-admin/plugin-editor.php
r3804 r3928 45 45 fwrite($f, $newcontent); 46 46 fclose($f); 47 header("Location:plugin-editor.php?file=$file&a=te");47 wp_redirect("plugin-editor.php?file=$file&a=te"); 48 48 } else { 49 header("Location:plugin-editor.php?file=$file");49 wp_redirect("plugin-editor.php?file=$file"); 50 50 } 51 51 -
trunk/wp-admin/plugins.php
r3804 r3928 13 13 do_action('activate_' . trim( $_GET['plugin'] )); 14 14 } 15 header('Location:plugins.php?activate=true');15 wp_redirect('plugins.php?activate=true'); 16 16 } else if ('deactivate' == $_GET['action']) { 17 17 check_admin_referer('deactivate-plugin_' . $_GET['plugin']); … … 20 20 update_option('active_plugins', $current); 21 21 do_action('deactivate_' . trim( $_GET['plugin'] )); 22 header('Location:plugins.php?deactivate=true');22 wp_redirect('plugins.php?deactivate=true'); 23 23 } 24 24 exit; -
trunk/wp-admin/post.php
r3918 r3928 53 53 $location = "post.php?action=edit&post=$post_ID"; 54 54 55 header("Location: $location");55 wp_redirect($location); 56 56 exit(); 57 57 break; … … 120 120 } 121 121 122 header ('Location: ' .$location); // Send user on their way while we keep working122 wp_redirect($location); // Send user on their way while we keep working 123 123 124 124 exit(); … … 146 146 elseif (strstr($sendback, 'attachments.php')) $sendback = get_settings('siteurl') .'/wp-admin/attachments.php'; 147 147 $sendback = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $sendback); 148 header ('Location: ' .$sendback);148 wp_redirect($sendback); 149 149 exit(); 150 150 break; 151 151 152 152 default: 153 header('Location:edit.php');153 wp_redirect('edit.php'); 154 154 exit(); 155 155 break; -
trunk/wp-admin/templates.php
r3804 r3928 48 48 fwrite($f, $newcontent); 49 49 fclose($f); 50 header("Location:templates.php?file=$file&a=te");50 wp_redirect("templates.php?file=$file&a=te"); 51 51 } else { 52 header("Location:templates.php?file=$file&a=err");52 wp_redirect("templates.php?file=$file&a=err"); 53 53 } 54 54 } else { 55 header("Location:templates.php?file=$file&a=err");55 wp_redirect("templates.php?file=$file&a=err"); 56 56 } 57 57 -
trunk/wp-admin/theme-editor.php
r3804 r3928 59 59 fwrite($f, $newcontent); 60 60 fclose($f); 61 header("Location:theme-editor.php?file=$file&theme=$theme&a=te");61 wp_redirect("theme-editor.php?file=$file&theme=$theme&a=te"); 62 62 } else { 63 header("Location:theme-editor.php?file=$file&theme=$theme");63 wp_redirect("theme-editor.php?file=$file&theme=$theme"); 64 64 } 65 65 -
trunk/wp-admin/themes.php
r3804 r3928 14 14 do_action('switch_theme', get_current_theme()); 15 15 16 header('Location:themes.php?activated=true');16 wp_redirect('themes.php?activated=true'); 17 17 exit; 18 18 } -
trunk/wp-admin/user-edit.php
r3859 r3928 48 48 $redirect = "user-edit.php?user_id=$user_id&updated=true"; 49 49 $redirect = add_query_arg('wp_http_referer', urlencode($wp_http_referer), $redirect); 50 header("Location: $redirect");50 wp_redirect($redirect); 51 51 exit; 52 52 } -
trunk/wp-admin/users.php
r3864 r3928 125 125 126 126 if (empty($_POST['users'])) { 127 header('Location: ' .$redirect);127 wp_redirect($redirect); 128 128 } 129 129 … … 146 146 } 147 147 148 header('Location: ' .add_query_arg('update', $update, $redirect));148 wp_redirect(add_query_arg('update', $update, $redirect)); 149 149 150 150 break; … … 155 155 156 156 if ( empty($_POST['users']) ) { 157 header('Location: ' .$redirect);157 wp_redirect($redirect); 158 158 } 159 159 … … 186 186 $redirect = add_query_arg('delete_count', $delete_count, $redirect); 187 187 188 header('Location: ' .add_query_arg('update', $update, $redirect));188 wp_redirect(add_query_arg('update', $update, $redirect)); 189 189 190 190 break; … … 195 195 196 196 if ( empty($_POST['users']) ) 197 header('Location: ' .$redirect);197 wp_redirect($redirect); 198 198 199 199 if ( !current_user_can('delete_users') ) … … 262 262 $new_user_login = apply_filters('pre_user_login', sanitize_user(stripslashes($_POST['user_login']), true)); 263 263 $redirect = add_query_arg('usersearch', $new_user_login, $redirect); 264 header('Location: ' .add_query_arg('update', $update, $redirect) . '#user-' . $user_id);264 wp_redirect(add_query_arg('update', $update, $redirect) . '#user-' . $user_id); 265 265 die(); 266 266 } -
trunk/wp-content/themes/default/functions.php
r3517 r3928 124 124 } 125 125 //print_r($_REQUEST); 126 header("Location:themes.php?page=functions.php&saved=true");126 wp_redirect("themes.php?page=functions.php&saved=true"); 127 127 die; 128 128 } -
trunk/wp-includes/pluggable.php
r3926 r3928 222 222 nocache_headers(); 223 223 224 header('Location: ' .get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI']));224 wp_redirect(get_settings('siteurl') . '/wp-login.php?redirect_to=' . urlencode($_SERVER['REQUEST_URI'])); 225 225 exit(); 226 226 } -
trunk/wp-login.php
r3732 r3928 31 31 $redirect_to = 'wp-login.php'; 32 32 if ( isset($_REQUEST['redirect_to']) ) 33 $redirect_to = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $_REQUEST['redirect_to']);33 $redirect_to = $_REQUEST['redirect_to']; 34 34 35 35 wp_redirect($redirect_to); … … 174 174 else 175 175 $redirect_to = $_REQUEST['redirect_to']; 176 $redirect_to = preg_replace('|[^a-z0-9-~+_.?#=&;,/:]|i', '', $redirect_to);177 176 178 177 if( $_POST ) { … … 241 240 <p class="submit"> 242 241 <input type="submit" name="submit" id="submit" value="<?php _e('Login'); ?> »" tabindex="4" /> 243 <input type="hidden" name="redirect_to" value="<?php echo $redirect_to; ?>" />242 <input type="hidden" name="redirect_to" value="<?php echo wp_specialchars($redirect_to); ?>" /> 244 243 </p> 245 244 </form> -
trunk/wp-trackback.php
r3369 r3928 56 56 if (empty($title) && empty($tb_url) && empty($blog_name)) { 57 57 // If it doesn't look like a trackback at all... 58 header('Location: ' .get_permalink($tb_id));58 wp_redirect(get_permalink($tb_id)); 59 59 exit; 60 60 }
Note: See TracChangeset
for help on using the changeset viewer.