Ticket #8837: 8837.patch
| File 8837.patch, 1.3 KB (added by , 18 years ago) |
|---|
-
wp-admin/categories.php
25 25 if ( !current_user_can('manage_categories') ) 26 26 wp_die(__('Cheatin’ uh?')); 27 27 28 if ( wp_insert_category($_POST ) ) {29 wp_ redirect('categories.php?message=1#addcat');30 } else {31 wp_ redirect('categories.php?message=4#addcat');32 } 28 if ( wp_insert_category($_POST ) ) 29 wp_safe_redirect( add_query_arg( 'message', 1, wp_get_referer() ) . '#addcat' ); 30 else 31 wp_safe_redirect( add_query_arg( 'message', 4, wp_get_referer() ) . '#addcat' ); 32 33 33 exit; 34 34 break; 35 35 … … 43 43 $cat_name = get_catname($cat_ID); 44 44 45 45 // Don't delete the default cats. 46 if ( $cat_ID == get_option('default_category') )46 if ( $cat_ID == get_option('default_category') ) 47 47 wp_die(sprintf(__("Can’t delete the <strong>%s</strong> category: this is the default one"), $cat_name)); 48 48 49 49 wp_delete_category($cat_ID); 50 50 51 wp_ redirect('categories.php?message=2');51 wp_safe_redirect( add_query_arg( 'message', 2, wp_get_referer() ) ); 52 52 exit; 53 53 54 54 break; … … 69 69 wp_delete_category($cat_ID); 70 70 } 71 71 72 $sendback = wp_get_referer(); 73 74 wp_redirect($sendback); 72 wp_safe_redirect( wp_get_referer() ); 75 73 exit(); 76 74 77 75 break;
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)