Initial functionality so level 1 users may be allowed to publish or just post drafts.

git-svn-id: https://develop.svn.wordpress.org/trunk@1656 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Matt Mullenweg
2004-09-14 12:41:09 +00:00
parent 9d7f710ce7
commit 2059519dbf
5 changed files with 38 additions and 33 deletions
+6
View File
@@ -66,6 +66,9 @@ case 'post':
$post_name = $_POST['post_name'];
if (empty($post_status)) $post_status = 'draft';
// Double-check
if ( 'publish' == $post_status && 1 == $user_level && 2 != get_option('new_users_can_blog') )
$post_status = 'draft';
$comment_status = $_POST['comment_status'];
if (empty($comment_status)) $comment_status = get_settings('default_comment_status');
$ping_status = $_POST['ping_status'];
@@ -322,6 +325,9 @@ case 'editpost':
$trackback = preg_replace('|\s+|', '\n', $trackback);
if (isset($_POST['publish'])) $post_status = 'publish';
// Double-check
if ( 'publish' == $post_status && 1 == $user_level && 2 != get_option('new_users_can_blog') )
$post_status = 'draft';
if (($user_level > 4) && (!empty($_POST['edit_date']))) {
$aa = $_POST['aa'];