Make WordPress Core

Changeset 11190 for trunk/xmlrpc.php


Ignore:
Timestamp:
05/05/2009 04:28:05 AM (17 years ago)
Author:
azaozz
Message:

Banishing ASCII quotes and apostrophes, props demetris, fixes #9655

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/xmlrpc.php

    r10982 r11190  
    499499
    500500        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.' ) );
    502502
    503503        do_action('xmlrpc_call', 'wp.getPage');
     
    596596
    597597        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.' ) );
    599599
    600600        do_action('xmlrpc_call', 'wp.getPages');
     
    650650        // Make sure the user is allowed to add new pages.
    651651        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.")));
    653653        }
    654654
     
    781781
    782782        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.' ) );
    784784
    785785        do_action('xmlrpc_call', 'wp.getPageList');
     
    834834
    835835        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.")));
    837837        }
    838838
     
    11031103
    11041104        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.' ) );
    11061106
    11071107        do_action('xmlrpc_call', 'wp.getComments');
     
    16661666
    16671667        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.' ) );
    16691669
    16701670        do_action('xmlrpc_call', 'blogger.getPost');
     
    18121812
    18131813        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.'));
    18151815        }
    18161816
     
    23352335        // created (which was the old behavior).
    23362336        if(empty($postdata["ID"])) {
    2337             return(new IXR_Error(404, __("Invalid post id.")));
     2337            return(new IXR_Error(404, __("Invalid post ID.")));
    23382338        }
    23392339
     
    25652565
    25662566        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.' ) );
    25682568
    25692569        do_action('xmlrpc_call', 'metaWeblog.getPost');
     
    30483048
    30493049        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.'));
    30513051
    30523052        foreach($categories as $cat) {
     
    31583158
    31593159        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.'));
    31613161
    31623162        $postdata = wp_get_single_post($post_ID,ARRAY_A);
     
    32453245        } else {
    32463246            // 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.'));
    32483248        }
    32493249        $post_ID = (int) $post_ID;
     
    32553255
    32563256        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.'));
    32583258
    32593259        if ( $post_ID == url_to_postid($pagelinkedfrom) )
     
    32623262        // Check if pings are on
    32633263        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.'));
    32653265
    32663266        // Let's check that the remote site didn't already pingback this entry
     
    33703370        if (!$post_ID) {
    33713371            // 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.'));
    33733373        }
    33743374
Note: See TracChangeset for help on using the changeset viewer.