Révision 5587145e
Ajouté par Assos Assos il y a presque 7 ans
drupal7/modules/file/file.module | ||
---|---|---|
146 | 146 |
// headers for files controlled by other modules. Make an exception for |
147 | 147 |
// temporary files where the host entity has not yet been saved (for example, |
148 | 148 |
// an image preview on a node/add form) in which case, allow download by the |
149 |
// file's owner. |
|
150 |
if (empty($references) && ($file->status == FILE_STATUS_PERMANENT || $file->uid != $user->uid)) { |
|
149 |
// file's owner. For anonymous file owners, only the browser session that |
|
150 |
// uploaded the file should be granted access. |
|
151 |
if (empty($references) && ($file->status == FILE_STATUS_PERMANENT || $file->uid != $user->uid || (!$user->uid && empty($_SESSION['anonymous_allowed_file_ids'][$file->fid])))) { |
|
151 | 152 |
return; |
152 | 153 |
} |
153 | 154 |
|
... | ... | |
283 | 284 |
$form['#prefix'] .= theme('status_messages'); |
284 | 285 |
$output = drupal_render($form); |
285 | 286 |
$js = drupal_add_js(); |
286 |
$settings = call_user_func_array('array_merge_recursive', $js['settings']['data']);
|
|
287 |
$settings = drupal_array_merge_deep_array($js['settings']['data']);
|
|
287 | 288 |
|
288 | 289 |
$commands[] = ajax_command_replace(NULL, $output, $settings); |
289 | 290 |
return array('#type' => 'ajax', '#commands' => $commands); |
Formats disponibles : Unified diff
Update to 7.56