Ticket #5723: wp-app.diff
File wp-app.diff, 1.2 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 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 } else { 259 $this->auth_required($msg_cant_publish . ' ' . 260 __('Please submit your post as draft for review.')); 261 } 262 } 263 } else { 264 if (!current_user_can('edit_posts')) 265 $this->auth_required(__('Sorry, you do not have the right to submit new posts.')); 266 } 253 267 254 if(!current_user_can($cap))255 $this->auth_required(__('Sorry, you do not have the right to edit/publish new posts.'));256 257 268 $blog_ID = (int ) $blog_id; 258 269 $post_status = ($publish) ? 'publish' : 'draft'; 259 270 $post_author = (int) $user_ID;