Make WordPress Core

Changeset 34603


Ignore:
Timestamp:
09/26/2015 07:48:57 PM (10 years ago)
Author:
wonderboymusic
Message:

After [34577], alter wp_xmlrpc_server::mw_newMediaObject() to check upload space in multisite.

See #21292.

Location:
trunk/src/wp-includes
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/wp-includes/class-wp-xmlrpc-server.php

    r34580 r34603  
    57225722        }
    57235723
     5724        if ( is_multisite() && upload_is_user_over_quota( false ) ) {
     5725            $this->error = new IXR_Error( 401, __( 'Sorry, you have used your space allocation.' ) );
     5726            return $this->error;
     5727        }
     5728
    57245729        /**
    57255730         * Filter whether to preempt the XML-RPC media upload.
  • trunk/src/wp-includes/ms-functions.php

    r34455 r34603  
    23732373 */
    23742374function get_upload_space_available() {
    2375     $space_allowed = get_space_allowed() * 1024 * 1024;
     2375    $allowed = get_space_allowed();
     2376    if ( $allowed < 0 ) {
     2377        $allowed = 0;
     2378    }
     2379    $space_allowed = $allowed * 1024 * 1024;
    23762380    if ( get_site_option( 'upload_space_check_disabled' ) )
    23772381        return $space_allowed;
Note: See TracChangeset for help on using the changeset viewer.