diff --git src/wp-admin/network/settings.php src/wp-admin/network/settings.php
index 1736511..855ffa0 100644
|
|
if ( $_POST ) { |
61 | 61 | foreach ( $options as $option_name ) { |
62 | 62 | if ( ! isset($_POST[$option_name]) ) |
63 | 63 | continue; |
64 | | $value = wp_unslash( $_POST[$option_name] ); |
| 64 | if ( $option_name == 'fileupload_maxk' ) { |
| 65 | $value = (float)wp_unslash($_POST[$option_name]) * 1024; |
| 66 | } |
| 67 | else { |
| 68 | $value = wp_unslash( $_POST[$option_name] ); |
| 69 | } |
65 | 70 | update_site_option( $option_name, $value ); |
66 | 71 | } |
67 | 72 | |
… |
… |
if ( isset( $_GET['updated'] ) ) { |
269 | 274 | |
270 | 275 | <tr> |
271 | 276 | <th scope="row"><label for="fileupload_maxk"><?php _e( 'Max upload file size' ) ?></label></th> |
272 | | <td><?php printf( _x( '%s KB', 'File size in kilobytes' ), '<input name="fileupload_maxk" type="number" min="0" style="width: 100px" id="fileupload_maxk" value="' . esc_attr( get_site_option( 'fileupload_maxk', 300 ) ) . '" />' ); ?></td> |
| 277 | <td><?php printf( _x( '%s MB', 'File size in MB' ), '<input name="fileupload_maxk" type="number" min="0" step="1" style="width: 100px" id="fileupload_maxk" value="' . round( esc_attr( get_site_option( 'fileupload_maxk', 300 )/1024 ), 2) . '" />' ); ?></td> |
273 | 278 | </tr> |
274 | 279 | </table> |
275 | 280 | |