[wp-trac] [WordPress Trac] #30202: In multisite, the "storage space used" is incorrectly calculated for the main blog/site.

WordPress Trac noreply at wordpress.org
Tue Nov 18 00:55:29 UTC 2014


#30202: In multisite, the "storage space used" is incorrectly calculated for the
main blog/site.
--------------------------------+------------------------------
 Reporter:  rebekahickey        |       Owner:
     Type:  defect (bug)        |      Status:  new
 Priority:  normal              |   Milestone:  Awaiting Review
Component:  Networks and Sites  |     Version:  4.0
 Severity:  normal              |  Resolution:
 Keywords:  has-patch           |     Focuses:  multisite
--------------------------------+------------------------------
Changes (by earnjam):

 * keywords:   => has-patch


Comment:

 In [attachment:30202.diff]
 * Added optional `$exclude` parameter to `get_dirsize()` to allow the
 exclusion of a directory from the total
 * Added optional `$exclude` parameter to `recurse_dirsize()` to allow the
 exclusion of a directory from the total
 * In `get_space_used()` added check for `is_main_site()`, and if true,
 pass the `uploads/sites` sub-directory as the exclude value to
 `get_dirsize()` so that we are only counting the files for the main site
 from the main site dashboard.

 I also cleaned up the individual edited lines to match the coding
 standards.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30202#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list