Revert the rememeber last view for comments page code as it is confusing.

git-svn-id: http://svn.automattic.com/wordpress/trunk@11231 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
westi 2009-05-07 07:38:14 +00:00
parent f0c4dc3058
commit ac3b739302
1 changed files with 1 additions and 6 deletions

View File

@ -85,14 +85,9 @@ require_once('admin-header.php');
$mode = ( ! isset($_GET['mode']) || empty($_GET['mode']) ) ? 'detail' : esc_attr($_GET['mode']);
$default_status = get_user_option('edit_comments_last_view');
if ( empty($default_status) )
$default_status = 'all';
$comment_status = isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : $default_status;
$comment_status = isset($_REQUEST['comment_status']) ? $_REQUEST['comment_status'] : 'all';
if ( !in_array($comment_status, array('all', 'moderated', 'approved', 'spam')) )
$comment_status = 'all';
if ( $comment_status != $default_status )
update_usermeta($current_user->ID, 'edit_comments_last_view', $comment_status);
$comment_type = !empty($_GET['comment_type']) ? esc_attr($_GET['comment_type']) : '';