Changeset 20972 for trunk/wp-includes/class-wp-xmlrpc-server.php
- Timestamp:
- 06/01/2012 07:05:30 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/wp-includes/class-wp-xmlrpc-server.php
r20856 r20972 1474 1474 1475 1475 if ( ! taxonomy_exists( $content_struct['taxonomy'] ) ) 1476 return new IXR_Error( 403, __( 'Invalid taxonomy .' ) );1476 return new IXR_Error( 403, __( 'Invalid taxonomy' ) ); 1477 1477 1478 1478 $taxonomy = get_taxonomy( $content_struct['taxonomy'] ); … … 1562 1562 1563 1563 if ( ! taxonomy_exists( $content_struct['taxonomy'] ) ) 1564 return new IXR_Error( 403, __( 'Invalid taxonomy .' ) );1564 return new IXR_Error( 403, __( 'Invalid taxonomy' ) ); 1565 1565 1566 1566 $taxonomy = get_taxonomy( $content_struct['taxonomy'] ); … … 1654 1654 1655 1655 if ( ! taxonomy_exists( $taxonomy ) ) 1656 return new IXR_Error( 403, __( 'Invalid taxonomy .' ) );1656 return new IXR_Error( 403, __( 'Invalid taxonomy' ) ); 1657 1657 1658 1658 $taxonomy = get_taxonomy( $taxonomy ); … … 1721 1721 1722 1722 if ( ! taxonomy_exists( $taxonomy ) ) 1723 return new IXR_Error( 403, __( 'Invalid taxonomy .' ) );1723 return new IXR_Error( 403, __( 'Invalid taxonomy' ) ); 1724 1724 1725 1725 $taxonomy = get_taxonomy( $taxonomy ); … … 1774 1774 1775 1775 if ( ! taxonomy_exists( $taxonomy ) ) 1776 return new IXR_Error( 403, __( 'Invalid taxonomy .' ) );1776 return new IXR_Error( 403, __( 'Invalid taxonomy' ) ); 1777 1777 1778 1778 $taxonomy = get_taxonomy( $taxonomy ); … … 1853 1853 1854 1854 if ( ! taxonomy_exists( $taxonomy ) ) 1855 return new IXR_Error( 403, __( 'Invalid taxonomy .' ) );1855 return new IXR_Error( 403, __( 'Invalid taxonomy' ) ); 1856 1856 1857 1857 $taxonomy = get_taxonomy( $taxonomy ); … … 2951 2951 2952 2952 if ( !current_user_can( 'upload_files' ) ) 2953 return new IXR_Error( 403, __( 'You are not allowed to upload files to this site.' ) );2953 return new IXR_Error( 403, __( 'You do not have permission to upload files.' ) ); 2954 2954 2955 2955 do_action('xmlrpc_call', 'wp.getMediaItem'); … … 2996 2996 2997 2997 if ( !current_user_can( 'upload_files' ) ) 2998 return new IXR_Error( 401, __( ' Sorry, you cannotupload files.' ) );2998 return new IXR_Error( 401, __( 'You do not have permission to upload files.' ) ); 2999 2999 3000 3000 do_action('xmlrpc_call', 'wp.getMediaLibrary'); … … 3105 3105 3106 3106 if( ! post_type_exists( $post_type_name ) ) 3107 return new IXR_Error( 403, __( 'Invalid post type .' ) );3107 return new IXR_Error( 403, __( 'Invalid post type' ) ); 3108 3108 3109 3109 $post_type = get_post_type_object( $post_type_name ); … … 3680 3680 } else { 3681 3681 // No other post_type values are allowed here 3682 return new IXR_Error( 401, __( 'Invalid post type .' ) );3682 return new IXR_Error( 401, __( 'Invalid post type' ) ); 3683 3683 } 3684 3684 } else { … … 3736 3736 break; 3737 3737 default: 3738 return(new IXR_Error(401, __('Invalid post type .')));3738 return(new IXR_Error(401, __('Invalid post type'))); 3739 3739 break; 3740 3740 } … … 3988 3988 // Use wp.editPost to edit post types other than post and page. 3989 3989 if ( ! in_array( $postdata[ 'post_type' ], array( 'post', 'page' ) ) ) 3990 return new IXR_Error( 401, __( 'Invalid post type .' ) );3990 return new IXR_Error( 401, __( 'Invalid post type' ) ); 3991 3991 3992 3992 // Thwart attempt to change the post type. … … 4040 4040 break; 4041 4041 default: 4042 return(new IXR_Error(401, __('Invalid post type .')));4042 return(new IXR_Error(401, __('Invalid post type'))); 4043 4043 break; 4044 4044 } … … 4532 4532 4533 4533 if ( !current_user_can('upload_files') ) { 4534 $this->error = new IXR_Error( 401, __('You are not allowed to upload files to this site.'));4534 $this->error = new IXR_Error( 401, __( 'You do not have permission to upload files.' ) ); 4535 4535 return $this->error; 4536 4536 }
Note: See TracChangeset
for help on using the changeset viewer.