1 system.install system_update_1011()

Specify the files directory manually if needed.

Related topics

File

core/modules/system/system.install, line 1920
Install, update and uninstall functions for the system module.

Code

function system_update_1011() {
  $file_path = update_variable_get('file_public_path', NULL);
  if (is_null($file_path)) {
    $conf_path = conf_path();
    if ($conf_path != '.') {
      $conf_path = str_replace('./', '', $conf_path);
      update_variable_set('file_public_path', $conf_path . '/files');
    }
    else {
      update_variable_set('file_public_path', 'sites/default/files');
    }
  }
}