Skip to content
Snippets Groups Projects
Commit fe7e01c6 authored by Angie Byron's avatar Angie Byron
Browse files

#931736 by dww: Fixed No upgrade path for the D6 'file_directory_temp' setting.

parent 2e438914
Branches
Tags
2 merge requests!7452Issue #1797438. HTML5 validation is preventing form submit and not fully...,!789Issue #3210310: Adjust Database API to remove deprecated Drupal 9 code in Drupal 10
...@@ -19735,7 +19735,15 @@ ...@@ -19735,7 +19735,15 @@
)) ))
->values(array( ->values(array(
'name' => 'file_directory_temp', 'name' => 'file_directory_temp',
'value' => 's:26:"/Applications/MAMP/tmp/php";', 'value' => 's:29:"/drupal-6/file/directory/temp";',
))
->values(array(
'name' => 'file_directory_path',
'value' => 's:29:"/drupal-6/file/directory/path";',
))
->values(array(
'name' => 'file_downloads',
'value' => 'i:2;',
)) ))
->values(array( ->values(array(
'name' => 'filter_html_1', 'name' => 'filter_html_1',
......
...@@ -65,5 +65,14 @@ class UploadUpgradePathTestCase extends UpgradePathTestCase { ...@@ -65,5 +65,14 @@ class UploadUpgradePathTestCase extends UpgradePathTestCase {
} }
$this->assertIdentical($filenames, $recorded_filenames, 'The uploaded files are present in the same order after the upgrade.'); $this->assertIdentical($filenames, $recorded_filenames, 'The uploaded files are present in the same order after the upgrade.');
} }
// Make sure the file settings were properly migrated.
$d6_file_directory_temp = '/drupal-6/file/directory/temp';
$d6_file_directory_path = '/drupal-6/file/directory/path';
$d6_file_downloads = 2; // FILE_DOWNLOADS_PRIVATE
$this->assertNull(variable_get('file_directory_temp', NULL), "The 'file_directory_temp' variable was properly removed.");
$this->assertEqual(variable_get('file_temporary_path', 'drupal-7-bogus'), $d6_file_directory_temp, "The 'file_temporary_path' setting was properly migrated.");
$this->assertEqual(variable_get('file_default_scheme', 'drupal-7-bogus'), 'private', "The 'file_default_scheme' setting was properly migrated.");
$this->assertEqual(variable_get('file_private_path', 'drupal-7-bogus'), $d6_file_directory_path, "The 'file_private_path' setting was properly migrated.");
} }
} }
...@@ -2157,7 +2157,7 @@ function system_update_7033() { ...@@ -2157,7 +2157,7 @@ function system_update_7033() {
} }
/** /**
* Migrate the file_downloads setting and create the new {file_managed} table. * Migrate the file path settings and create the new {file_managed} table.
*/ */
function system_update_7034() { function system_update_7034() {
$files_directory = variable_get('file_directory_path', NULL); $files_directory = variable_get('file_directory_path', NULL);
...@@ -2917,6 +2917,15 @@ function system_update_7065() { ...@@ -2917,6 +2917,15 @@ function system_update_7065() {
db_delete('sessions')->condition('sid', '')->execute(); db_delete('sessions')->condition('sid', '')->execute();
} }
/**
* Migrate the 'file_directory_temp' variable.
*/
function system_update_7066() {
$d6_file_directory_temp = variable_get('file_directory_temp', file_directory_temp());
variable_set('file_temporary_path', $d6_file_directory_temp);
variable_del('file_directory_temp');
}
/** /**
* @} End of "defgroup updates-6.x-to-7.x" * @} End of "defgroup updates-6.x-to-7.x"
* The next series of updates should start at 8000. * The next series of updates should start at 8000.
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment