mirror of
https://github.com/WordPress/WordPress.git
synced 2025-02-16 19:46:21 +00:00
After [34577], alter wp_xmlrpc_server::mw_newMediaObject()
to check upload space in multisite.
See #21292. Built from https://develop.svn.wordpress.org/trunk@34603 git-svn-id: http://core.svn.wordpress.org/trunk@34567 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
685ff76514
commit
2c30a11518
@ -5721,6 +5721,11 @@ class wp_xmlrpc_server extends IXR_Server {
|
|||||||
return $this->error;
|
return $this->error;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if ( is_multisite() && upload_is_user_over_quota( false ) ) {
|
||||||
|
$this->error = new IXR_Error( 401, __( 'Sorry, you have used your space allocation.' ) );
|
||||||
|
return $this->error;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Filter whether to preempt the XML-RPC media upload.
|
* Filter whether to preempt the XML-RPC media upload.
|
||||||
*
|
*
|
||||||
|
@ -2372,7 +2372,11 @@ function get_space_allowed() {
|
|||||||
* @return int of upload space available in bytes
|
* @return int of upload space available in bytes
|
||||||
*/
|
*/
|
||||||
function get_upload_space_available() {
|
function get_upload_space_available() {
|
||||||
$space_allowed = get_space_allowed() * 1024 * 1024;
|
$allowed = get_space_allowed();
|
||||||
|
if ( $allowed < 0 ) {
|
||||||
|
$allowed = 0;
|
||||||
|
}
|
||||||
|
$space_allowed = $allowed * 1024 * 1024;
|
||||||
if ( get_site_option( 'upload_space_check_disabled' ) )
|
if ( get_site_option( 'upload_space_check_disabled' ) )
|
||||||
return $space_allowed;
|
return $space_allowed;
|
||||||
|
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
*
|
*
|
||||||
* @global string $wp_version
|
* @global string $wp_version
|
||||||
*/
|
*/
|
||||||
$wp_version = '4.4-alpha-34602';
|
$wp_version = '4.4-alpha-34603';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
* Holds the WordPress DB revision, increments when changes are made to the WordPress DB schema.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user