Changeset 31090 for trunk/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 01/08/2015 07:04:40 AM (11 years ago)
- File:
-
- 1 edited
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-includes/class-wp-xmlrpc-server.php
r31079 r31090 3212 3212 if ( !$user ) { 3213 3213 $logged_in = false; 3214 if ( $allow_anon && get_option('comment_registration') ) 3214 if ( $allow_anon && get_option('comment_registration') ) { 3215 3215 return new IXR_Error( 403, __( 'You must be registered to comment' ) ); 3216 else if ( !$allow_anon )3216 } elseif ( ! $allow_anon ) { 3217 3217 return $this->error; 3218 } 3218 3219 } else { 3219 3220 $logged_in = true; … … 4874 4875 4875 4876 if ( ('publish' == $post_status) ) { 4876 if ( ( 'page' == $post_type ) && !current_user_can('publish_pages') ) 4877 return new IXR_Error(401, __('Sorry, you do not have the right to publish this page.')); 4878 else if ( !current_user_can('publish_posts') ) 4879 return new IXR_Error(401, __('Sorry, you do not have the right to publish this post.')); 4877 if ( ( 'page' == $post_type ) && ! current_user_can( 'publish_pages' ) ) { 4878 return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this page.' ) ); 4879 } elseif ( ! current_user_can( 'publish_posts' ) ) { 4880 return new IXR_Error( 401, __( 'Sorry, you do not have the right to publish this post.' ) ); 4881 } 4880 4882 } 4881 4883
Note: See TracChangeset
for help on using the changeset viewer.