Changeset 11190 for trunk/xmlrpc.php
- Timestamp:
- 05/05/2009 04:28:05 AM (17 years ago)
- File:
-
- 1 edited
-
trunk/xmlrpc.php (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/xmlrpc.php
r10982 r11190 499 499 500 500 if( !current_user_can( 'edit_page', $page_id ) ) 501 return new IXR_Error( 401, __( 'Sorry, you can not edit this page.' ) );501 return new IXR_Error( 401, __( 'Sorry, you cannot edit this page.' ) ); 502 502 503 503 do_action('xmlrpc_call', 'wp.getPage'); … … 596 596 597 597 if( !current_user_can( 'edit_pages' ) ) 598 return new IXR_Error( 401, __( 'Sorry, you can not edit pages.' ) );598 return new IXR_Error( 401, __( 'Sorry, you cannot edit pages.' ) ); 599 599 600 600 do_action('xmlrpc_call', 'wp.getPages'); … … 650 650 // Make sure the user is allowed to add new pages. 651 651 if(!current_user_can("publish_pages")) { 652 return(new IXR_Error(401, __("Sorry, you can not add new pages.")));652 return(new IXR_Error(401, __("Sorry, you cannot add new pages."))); 653 653 } 654 654 … … 781 781 782 782 if( !current_user_can( 'edit_pages' ) ) 783 return new IXR_Error( 401, __( 'Sorry, you can not edit pages.' ) );783 return new IXR_Error( 401, __( 'Sorry, you cannot edit pages.' ) ); 784 784 785 785 do_action('xmlrpc_call', 'wp.getPageList'); … … 834 834 835 835 if(!current_user_can("edit_posts")) { 836 return(new IXR_Error(401, __("Sorry, you can not edit posts on this blog.")));836 return(new IXR_Error(401, __("Sorry, you cannot edit posts on this blog."))); 837 837 } 838 838 … … 1103 1103 1104 1104 if ( !current_user_can( 'moderate_comments' ) ) 1105 return new IXR_Error( 401, __( 'Sorry, you can not edit comments.' ) );1105 return new IXR_Error( 401, __( 'Sorry, you cannot edit comments.' ) ); 1106 1106 1107 1107 do_action('xmlrpc_call', 'wp.getComments'); … … 1666 1666 1667 1667 if( !current_user_can( 'edit_post', $post_ID ) ) 1668 return new IXR_Error( 401, __( 'Sorry, you can not edit this post.' ) );1668 return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) ); 1669 1669 1670 1670 do_action('xmlrpc_call', 'blogger.getPost'); … … 1812 1812 1813 1813 if ( !current_user_can('edit_themes') ) { 1814 return new IXR_Error(401, __('Sorry, this user can not edit the template.'));1814 return new IXR_Error(401, __('Sorry, this user cannot edit the template.')); 1815 1815 } 1816 1816 … … 2335 2335 // created (which was the old behavior). 2336 2336 if(empty($postdata["ID"])) { 2337 return(new IXR_Error(404, __("Invalid post id.")));2337 return(new IXR_Error(404, __("Invalid post ID."))); 2338 2338 } 2339 2339 … … 2565 2565 2566 2566 if( !current_user_can( 'edit_post', $post_ID ) ) 2567 return new IXR_Error( 401, __( 'Sorry, you can not edit this post.' ) );2567 return new IXR_Error( 401, __( 'Sorry, you cannot edit this post.' ) ); 2568 2568 2569 2569 do_action('xmlrpc_call', 'metaWeblog.getPost'); … … 3048 3048 3049 3049 if ( !current_user_can('edit_post', $post_ID) ) 3050 return new IXR_Error(401, __('Sorry, you can not edit this post.'));3050 return new IXR_Error(401, __('Sorry, you cannot edit this post.')); 3051 3051 3052 3052 foreach($categories as $cat) { … … 3158 3158 3159 3159 if ( !current_user_can('edit_post', $post_ID) ) 3160 return new IXR_Error(401, __('Sorry, you can not edit this post.'));3160 return new IXR_Error(401, __('Sorry, you cannot edit this post.')); 3161 3161 3162 3162 $postdata = wp_get_single_post($post_ID,ARRAY_A); … … 3245 3245 } else { 3246 3246 // TODO: Attempt to extract a post ID from the given URL 3247 return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn \'t exist, or it is not a pingback-enabled resource.'));3247 return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn’t exist, or it is not a pingback-enabled resource.')); 3248 3248 } 3249 3249 $post_ID = (int) $post_ID; … … 3255 3255 3256 3256 if ( !$post ) // Post_ID not found 3257 return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn \'t exist, or it is not a pingback-enabled resource.'));3257 return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn’t exist, or it is not a pingback-enabled resource.')); 3258 3258 3259 3259 if ( $post_ID == url_to_postid($pagelinkedfrom) ) … … 3262 3262 // Check if pings are on 3263 3263 if ( !pings_open($post) ) 3264 return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn \'t exist, or it is not a pingback-enabled resource.'));3264 return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn’t exist, or it is not a pingback-enabled resource.')); 3265 3265 3266 3266 // Let's check that the remote site didn't already pingback this entry … … 3370 3370 if (!$post_ID) { 3371 3371 // We aren't sure that the resource is available and/or pingback enabled 3372 return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn \'t exist, or it is not a pingback-enabled resource.'));3372 return new IXR_Error(33, __('The specified target URL cannot be used as a target. It either doesn’t exist, or it is not a pingback-enabled resource.')); 3373 3373 } 3374 3374
Note: See TracChangeset
for help on using the changeset viewer.