Changeset 49407 for branches/3.9/src/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 10/29/2020 07:14:09 PM (6 years ago)
- Location:
- branches/3.9
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/wp-includes/class-wp-xmlrpc-server.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/3.9
- Property svn:mergeinfo changed
/branches/5.5 (added) merged: 49373-49379,49381 /trunk merged: 49380,49382-49388
- Property svn:mergeinfo changed
-
branches/3.9/src/wp-includes/class-wp-xmlrpc-server.php
r40701 r49407 3284 3284 return new IXR_Error( 404, __( 'Invalid post ID.' ) ); 3285 3285 3286 if ( 3287 'publish' === get_post_status( $post_id ) && 3288 ! current_user_can( 'edit_post', $post_id ) && 3289 post_password_required( $post_id ) 3290 ) { 3291 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3292 } 3293 3294 if ( 3295 'private' === get_post_status( $post_id ) && 3296 ! current_user_can( 'read_post', $post_id ) 3297 ) { 3298 return new IXR_Error( 403, __( 'Sorry, you are not allowed to comment on this post.' ) ); 3299 } 3300 3301 $comment = array(); 3286 3302 $comment['comment_post_ID'] = $post_id; 3287 3303 … … 3606 3622 do_action( 'xmlrpc_call', 'wp.getMediaItem' ); 3607 3623 3608 if ( ! $attachment = get_post($attachment_id) ) 3624 $attachment = get_post( $attachment_id ); 3625 if ( ! $attachment || 'attachment' !== $attachment->post_type ) { 3609 3626 return new IXR_Error( 404, __( 'Invalid attachment ID.' ) ); 3627 } 3610 3628 3611 3629 return $this->_prepare_media_item( $attachment );
Note:
See TracChangeset
for help on using the changeset viewer.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)