Changeset 6333

Show
Ignore:
Timestamp:
11/12/07 19:58:09 (10 months ago)
Author:
ryan
Message:

Check publish_posts not edit_published_posts when setting pending status. Props jeremyclarke. fixes #5329

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/wp-admin/includes/post.php

    r6287 r6333  
    6464 
    6565    if ( 'page' == $_POST['post_type'] ) { 
    66         if ('publish' == $_POST['post_status'] && !current_user_can( 'edit_published_pages' )) 
     66        if ('publish' == $_POST['post_status'] && !current_user_can( 'publish_pages' )) 
    6767            $_POST['post_status'] = 'pending'; 
    6868    } else { 
    69         if ('publish' == $_POST['post_status'] && !current_user_can( 'edit_published_posts' )) 
     69        if ('publish' == $_POST['post_status'] && !current_user_can( 'publish_posts' )) 
    7070            $_POST['post_status'] = 'pending'; 
    7171    }