Restore MultiSite checks on Upload settings, Add proper whitelisting. Props Denis-de-Bernardy. Fixes #11687

git-svn-id: http://svn.automattic.com/wordpress/trunk@13545 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
dd32 2010-03-02 10:31:06 +00:00
parent 4b45b18c1d
commit 44308debbe
2 changed files with 5 additions and 0 deletions

View File

@ -90,6 +90,7 @@ include('admin-header.php');
<?php do_settings_fields('media', 'embeds'); ?>
</table>
<?php if ( !is_multisite() ) : ?>
<h3><?php _e('Uploading Files'); ?></h3>
<table class="form-table">
<tr valign="top">
@ -117,6 +118,7 @@ include('admin-header.php');
<?php do_settings_fields('media', 'uploads'); ?>
</table>
<?php endif; ?>
<?php do_settings_sections('media'); ?>

View File

@ -35,6 +35,7 @@ $whitelist_options = array(
'options' => array( '' ) );
$mail_options = array('mailserver_url', 'mailserver_port', 'mailserver_login', 'mailserver_pass');
$uploads_options = array('uploads_use_yearmonth_folders', 'upload_path', 'upload_url_path');
if ( !is_multisite() ) {
if ( !defined( 'WP_SITEURL' ) ) $whitelist_options['general'][] = 'siteurl';
@ -45,6 +46,8 @@ if ( !is_multisite() ) {
$whitelist_options['writing'] = array_merge($whitelist_options['writing'], $mail_options);
$whitelist_options['writing'][] = 'ping_sites';
$whitelist_options['media'] = array_merge($whitelist_options['media'], $uploads_options);
} else {
$whitelist_options['general'][] = 'new_admin_email';
$whitelist_options['general'][] = 'WPLANG';