Fix upload dir defaults. Props Denis-de-Bernardy. fixes #11276

git-svn-id: https://develop.svn.wordpress.org/trunk@12405 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren
2009-12-15 17:53:51 +00:00
parent f2f48162ec
commit 922d26b596
3 changed files with 13 additions and 11 deletions
+2 -4
View File
@@ -189,12 +189,10 @@ function populate_options() {
do_action('populate_options');
if ( ini_get('safe_mode') ) {
// Safe mode screws up mkdir(), so we must use a flat structure.
// Safe mode can break mkdir() so use a flat structure by default.
$uploads_use_yearmonth_folders = 0;
$upload_path = WP_CONTENT_DIR;
} else {
$uploads_use_yearmonth_folders = 1;
$upload_path = WP_CONTENT_DIR . '/uploads';
}
$options = array(
@@ -265,7 +263,7 @@ function populate_options() {
// 2.0.1
'uploads_use_yearmonth_folders' => $uploads_use_yearmonth_folders,
'upload_path' => $upload_path,
'upload_path' => '',
// 2.0.3
'secret' => wp_generate_password(64),