Applied adapted Drupal core patch #572516 for sites with mixed public and private files
This commit is contained in:
parent
75c72c4cbb
commit
5c5aaddc78
6 changed files with 35 additions and 27 deletions
|
@ -496,7 +496,7 @@ function locale_system_update($components) {
|
|||
function locale_update_js_files() {
|
||||
global $language;
|
||||
|
||||
$dir = file_create_path(variable_get('locale_js_directory', 'languages'));
|
||||
$dir = file_create_path(variable_get('locale_js_directory', 'languages'), TRUE);
|
||||
$parsed = variable_get('javascript_parsed', array());
|
||||
|
||||
// The first three parameters are NULL in order to get an array with all
|
||||
|
|
|
@ -1391,11 +1391,11 @@ function system_performance_settings() {
|
|||
$form['bandwidth_optimizations'] = array(
|
||||
'#type' => 'fieldset',
|
||||
'#title' => t('Bandwidth optimizations'),
|
||||
'#description' => t('<p>Drupal can automatically optimize external resources like CSS and JavaScript, which can reduce both the size and number of requests made to your website. CSS files can be aggregated and compressed into a single file, while JavaScript files are aggregated (but not compressed). These optional optimizations may reduce server load, bandwidth requirements, and page loading times.</p><p>These options are disabled if you have not set up your files directory, or if your download method is set to private.</p>')
|
||||
'#description' => t('<p>Drupal can automatically optimize external resources like CSS and JavaScript, which can reduce both the size and number of requests made to your website. CSS files can be aggregated and compressed into a single file, while JavaScript files are aggregated (but not compressed). These optional optimizations may reduce server load, bandwidth requirements, and page loading times.</p><p>These options are disabled if you have not set up your files directory, or if your download method is set to private and directory %public_files does not exists or isn\'t writable.</p>', array('%public_files' => variable_get('file_dirpublic_path', 'files')))
|
||||
);
|
||||
|
||||
$directory = file_directory_path();
|
||||
$is_writable = is_dir($directory) && is_writable($directory) && (variable_get('file_downloads', FILE_DOWNLOADS_PUBLIC) == FILE_DOWNLOADS_PUBLIC);
|
||||
$directory = file_directory_path(0, TRUE);
|
||||
$is_writable = is_dir($directory) && is_writable($directory);
|
||||
$form['bandwidth_optimizations']['preprocess_css'] = array(
|
||||
'#type' => 'radios',
|
||||
'#title' => t('Optimize CSS files'),
|
||||
|
|
Reference in a new issue