Redirect properly on categories listing page, props Viper007Bond, fixes #8837

git-svn-id: http://svn.automattic.com/wordpress/trunk@10344 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
azaozz 2009-01-10 14:34:04 +00:00
parent 94be137f5c
commit adbc4e2d75

View File

@ -25,11 +25,11 @@ case 'addcat':
if ( !current_user_can('manage_categories') ) if ( !current_user_can('manage_categories') )
wp_die(__('Cheatin’ uh?')); wp_die(__('Cheatin’ uh?'));
if( wp_insert_category($_POST ) ) { if ( wp_insert_category($_POST ) )
wp_redirect('categories.php?message=1#addcat'); wp_safe_redirect( add_query_arg( 'message', 1, wp_get_referer() ) . '#addcat' );
} else { else
wp_redirect('categories.php?message=4#addcat'); wp_safe_redirect( add_query_arg( 'message', 4, wp_get_referer() ) . '#addcat' );
}
exit; exit;
break; break;
@ -48,7 +48,7 @@ case 'delete':
wp_delete_category($cat_ID); wp_delete_category($cat_ID);
wp_redirect('categories.php?message=2'); wp_safe_redirect( add_query_arg( 'message', 2, wp_get_referer() ) );
exit; exit;
break; break;
@ -69,9 +69,7 @@ case 'bulk-delete':
wp_delete_category($cat_ID); wp_delete_category($cat_ID);
} }
$sendback = wp_get_referer(); wp_safe_redirect( wp_get_referer() );
wp_redirect($sendback);
exit(); exit();
break; break;