Ticket #5725: wp-app.diff
File wp-app.diff, 1.4 KB (added by , 17 years ago) |
---|
-
wp-app.php
248 248 } 249 249 250 250 $publish = (isset($entry->draft) && trim($entry->draft) == 'yes') ? false : true; 251 $accept_new_post_as_draft = false; // auto-convert Contributor's new post to draft? 252 if ($publish) { 253 if (!current_user_can('publish_posts')) { 254 $msg_cant_publish = __('Sorry, you do not have the right to publish new posts.'); 251 255 252 $cap = ($publish) ? 'publish_posts' : 'edit_posts'; 256 if (!current_user_can('edit_posts')) { 257 $this->auth_required($msg_cant_publish); 258 } elseif ($accept_new_post_as_draft) { 259 $publish = false; 260 } else { 261 $this->auth_required($msg_cant_publish . ' ' . 262 __('Please submit your post as draft for review.')); 263 } 264 } 265 } else { 266 if (!current_user_can('edit_posts')) 267 $this->auth_required(__('Sorry, you do not have the right to submit new posts.')); 268 } 253 269 254 if(!current_user_can($cap))255 $this->auth_required(__('Sorry, you do not have the right to edit/publish new posts.'));256 257 270 $blog_ID = (int ) $blog_id; 258 271 $post_status = ($publish) ? 'publish' : 'draft'; 259 272 $post_author = (int) $user_ID;