[wp-trac] [WordPress Trac] #27224: Multisite upload settings are inconsistent
WordPress Trac
noreply at wordpress.org
Fri Oct 3 03:23:15 UTC 2014
#27224: Multisite upload settings are inconsistent
--------------------------------------+-------------------------
Reporter: danielbachhuber | Owner: jeremyfelt
Type: enhancement | Status: accepted
Priority: normal | Milestone: 4.1
Component: Networks and Sites | Version:
Severity: normal | Resolution:
Keywords: good-first-bug has-patch | Focuses: multisite
--------------------------------------+-------------------------
Changes (by jeremyfelt):
* owner: => jeremyfelt
* status: reopened => accepted
* milestone: Future Release => 4.1
Comment:
Thanks for the patches @banson_deven and @bogdand. These initial changes
get us close. I've expanded a bit in
[https://core.trac.wordpress.org/attachment/ticket/27224/27224.3.diff
27224.3.diff].
* When storing `fileupload_maxk`, force `absint()` when converting POSTed
MB to KB. I don't think we want to shift to float in the database after
storing int for so long.
* Adjust all 3 areas where `fileupload_maxk` is communicated throughout
core. Use `ceil()` to round up to the nearest integer. The default has
been 1500KB, which will calculate to 1.46MB. Using `round()` would round
down to 1MB by default and could cause confusion.
* There was one place - network settings - where the default site option
for `fileupload_maxk` was 300, even though it is set to 1500 in the
network schema. I changed this to be 1500 instead.
Note: This change does mean that a very precise DB setting such as
1234(KB) will now become a max size of 2MB and if re-saved from the
settings screen will become a DB setting of 2048(KB).
I don't think this fits right now, but in a future network settings
screen, it may be interesting to allow specification of unit in addition
to the number— 1GB, 200MB, 20000KB, etc...
And for the sake of history. It appears the decision to use KB was made
circa 2005 in or around [https://mu.trac.wordpress.org/changeset/165
mu:165]
--
Ticket URL: <https://core.trac.wordpress.org/ticket/27224#comment:7>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list