Changeset 7006
- Timestamp:
- 02/24/08 20:28:36 (9 months ago)
- Files:
-
- trunk/wp-admin/edit-comments.php (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/wp-admin/edit-comments.php
r7005 r7006 7 7 wp_enqueue_script('admin-forms'); 8 8 9 if ( !empty( $_REQUEST['delete_comments'] ) ) :9 if ( !empty( $_REQUEST['delete_comments'] ) ) { 10 10 check_admin_referer('bulk-comments'); 11 11 … … 28 28 } 29 29 endforeach; 30 wp_redirect( basename( __FILE__ ) . '?deleted=' . $comments_deleted . '&approved=' . $comments_approved . '&spam=' . $comments_spammed ); 31 endif; 30 $redirect_to = basename( __FILE__ ) . '?deleted=' . $comments_deleted . '&approved=' . $comments_approved . '&spam=' . $comments_spammed; 31 if ( !empty($_REQUEST['mode']) ) 32 $redirect_to = add_query_arg('mode', $_REQUEST['mode'], $redirect_to); 33 if ( !empty($_REQUEST['comment_status']) ) 34 $redirect_to = add_query_arg('comment_status', $_REQUEST['comment_status'], $redirect_to); 35 if ( !empty($_REQUEST['s']) ) 36 $redirect_to = add_query_arg('s', $_REQUEST['s'], $redirect_to); 37 wp_redirect( $redirect_to ); 38 } elseif ( !empty($_GET['_wp_http_referer']) ) { 39 wp_redirect(remove_query_arg(array('_wp_http_referer', '_wpnonce'), stripslashes($_SERVER['REQUEST_URI']))); 40 exit; 41 } 32 42 33 43 require_once('admin-header.php'); … … 37 47 else 38 48 $mode = attribute_escape($_GET['mode']); 49 50 if ( isset($_GET['comment_status']) ) 51 $comment_status = attribute_escape($_GET['comment_status']); 52 else 53 $comment_status = ''; 39 54 ?> 40 55 … … 45 60 <ul class="subsubsub"> 46 61 <?php 47 if ( isset($_GET['comment_status']) )48 $comment_status = $_GET['comment_status'];49 else50 $comment_status = '';51 62 $status_links = array(); 52 63 $num_comments = wp_count_comments(); … … 102 113 103 114 <input type="hidden" name="mode" value="<?php echo $mode; ?>" /> 115 <input type="hidden" name="comment_status" value="<?php echo $comment_status; ?>" /> 104 116 105 117 <ul class="view-switch"> 106 <li <?php if ( 'detail' == $mode ) echo "class='current'" ?>><a href=" ?mode=detail"><?php _e('Detail View') ?></a></li>107 <li <?php if ( 'list' == $mode ) echo "class='current'" ?>><a href=" ?mode=list"><?php _e('List View') ?></a></li>118 <li <?php if ( 'detail' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'detail', $_SERVER['REQUEST_URI'])) ?>"><?php _e('Detail View') ?></a></li> 119 <li <?php if ( 'list' == $mode ) echo "class='current'" ?>><a href="<?php echo clean_url(add_query_arg('mode', 'list', $_SERVER['REQUEST_URI'])) ?>"><?php _e('List View') ?></a></li> 108 120 </ul> 109 121
