Skip to content

Commit 6045d8f

Browse files
committed
Restore MultiSite checks on Upload settings, Add proper whitelisting. Props Denis-de-Bernardy. Fixes WordPress#11687
git-svn-id: https://develop.svn.wordpress.org/trunk@13545 602fd350-edb4-49c9-b593-d223f7449a82
1 parent aabe2a1 commit 6045d8f

2 files changed

Lines changed: 5 additions & 0 deletions

File tree

wp-admin/options-media.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
<?php do_settings_fields('media', 'embeds'); ?>
9191
</table>
9292

93+
<?php if ( !is_multisite() ) : ?>
9394
<h3><?php _e('Uploading Files'); ?></h3>
9495
<table class="form-table">
9596
<tr valign="top">
@@ -117,6 +118,7 @@
117118

118119
<?php do_settings_fields('media', 'uploads'); ?>
119120
</table>
121+
<?php endif; ?>
120122

121123
<?php do_settings_sections('media'); ?>
122124

wp-admin/options.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
'options' => array( '' ) );
3636

3737
$mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass');
38+
$uploads_options = array('uploads_use_yearmonth_folders', 'upload_path', 'upload_url_path');
3839

3940
if ( !is_multisite() ) {
4041
if ( !defined( 'WP_SITEURL' ) ) $whitelist_options['general'][] = 'siteurl';
@@ -45,6 +46,8 @@
4546

4647
$whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options);
4748
$whitelist_options['writing'][] = 'ping_sites';
49+
50+
$whitelist_options['media'] = array_merge($whitelist_options['media'], $uploads_options);
4851
} else {
4952
$whitelist_options['general'][] = 'new_admin_email';
5053
$whitelist_options['general'][] = 'WPLANG';

0 commit comments

Comments
 (0)