From fc0583beabb4e0437551bf600c94bd6ca9f6af04 Mon Sep 17 00:00:00 2001 From: saxmatt Date: Tue, 14 Sep 2004 12:41:09 +0000 Subject: [PATCH] Initial functionality so level 1 users may be allowed to publish or just post drafts. git-svn-id: http://svn.automattic.com/wordpress/trunk@1656 1a063a9b-81f0-0310-95a4-ce76da25c4cd --- wp-admin/edit-form-advanced.php | 7 +++++- wp-admin/edit-form.php | 42 +++++++++++++-------------------- wp-admin/options-general.php | 7 ++---- wp-admin/options-writing.php | 9 +++++-- wp-admin/post.php | 6 +++++ 5 files changed, 38 insertions(+), 33 deletions(-) diff --git a/wp-admin/edit-form-advanced.php b/wp-admin/edit-form-advanced.php index 24e2d1d96..188e3875a 100644 --- a/wp-admin/edit-form-advanced.php +++ b/wp-admin/edit-form-advanced.php @@ -65,7 +65,10 @@ window.onload = focusit;
-
+
+ + +
@@ -142,7 +145,9 @@ if ($action != 'editcomment') { + + diff --git a/wp-admin/edit-form.php b/wp-admin/edit-form.php index fb2f36d50..359a4709f 100644 --- a/wp-admin/edit-form.php +++ b/wp-admin/edit-form.php @@ -1,29 +1,13 @@
-'; - -$form_trackback = '

(Separate multiple URIs with spaces.)
'), 'http://wordpress.org/docs/reference/post/#trackback') . - '

'; - - -$saveasdraft = ''; - - -?>
-'; -} -?> + + + - + - - + + +

(Separate multiple URIs with spaces.)
'), 'http://wordpress.org/docs/reference/post/#trackback') ?> +

- + + + - + +'; } ?>

- + + +
diff --git a/wp-admin/options-general.php b/wp-admin/options-general.php index eabb6deb9..151b8bdd1 100644 --- a/wp-admin/options-general.php +++ b/wp-admin/options-general.php @@ -47,7 +47,7 @@ include('options-head.php');

- + @@ -78,10 +78,7 @@ include('options-head.php'); +
-
-
diff --git a/wp-admin/options-writing.php b/wp-admin/options-writing.php index 953ccb639..7d72e1bc6 100644 --- a/wp-admin/options-writing.php +++ b/wp-admin/options-writing.php @@ -48,7 +48,7 @@ include('options-head.php');

Writing Options

- + @@ -87,6 +87,11 @@ endforeach; ?> + + +

+
+
@@ -129,7 +134,7 @@ endforeach; ?> - +

diff --git a/wp-admin/post.php b/wp-admin/post.php index 98394ac0a..54c214a39 100644 --- a/wp-admin/post.php +++ b/wp-admin/post.php @@ -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'];