[wp-trac] [WordPress Trac] #21181: simplify and add filter to is_upload_space_available

WordPress Trac wp-trac at lists.automattic.com
Fri Aug 3 00:11:10 UTC 2012


#21181: simplify and add filter to is_upload_space_available
-------------------------+-----------------------
 Reporter:  jkudish      |       Owner:  westi
     Type:  enhancement  |      Status:  reopened
 Priority:  normal       |   Milestone:  3.5
Component:  Multisite    |     Version:  3.4.1
 Severity:  normal       |  Resolution:
 Keywords:  has-patch    |
-------------------------+-----------------------
Changes (by Jayjdk):

 * status:  closed => reopened
 * resolution:  fixed =>


Comment:

 One of my sites currently use 1.84 MB of space but after this commit, the
 dashboard says that is using 1930466 MB

 1930466 is ~1.84 * 1024 * 1024

 The code before used to calculate it:
 {{{
 $used = get_dirsize( BLOGUPLOADDIR ) / 1024 / 1024;
 }}}

 The code used now (`wp_dashboard_quota()`, wp-admin/includes/dashboard.php
 line 1100):
 {{{
 $used = get_space_used();
 }}}

 But the `get_space_used()` function uses `get_dirsize( BLOGUPLOADDIR )`
 without dividing with 1024 / 1024.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/21181#comment:13>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list