Security update for Core, with self-updated composer
[yaffs-website] / web / core / includes / file.inc
index 3fcb38a4e45f6433ef041e5f00367433aceb847f..b6ab267e4f6e103ac38e373a66f0131d4d8fbeb9 100644 (file)
@@ -526,7 +526,6 @@ function file_unmanaged_prepare($source, &$destination = NULL, $replace = FILE_E
     $destination = file_build_uri(drupal_basename($source));
   }
 
-
   // Prepare the destination directory.
   if (file_prepare_directory($destination)) {
     // The destination is already a directory, so append the source basename.
@@ -716,8 +715,10 @@ function file_munge_filename($filename, $extensions, $alerts = TRUE) {
     // Split the filename up by periods. The first part becomes the basename
     // the last part the final extension.
     $filename_parts = explode('.', $filename);
-    $new_filename = array_shift($filename_parts); // Remove file basename.
-    $final_extension = array_pop($filename_parts); // Remove final extension.
+    // Remove file basename.
+    $new_filename = array_shift($filename_parts);
+    // Remove final extension.
+    $final_extension = array_pop($filename_parts);
 
     // Loop through the middle parts of the name and add an underscore to the
     // end of each section that could be a file extension but isn't in the list
@@ -923,7 +924,6 @@ function file_unmanaged_delete_recursive($path, $callback = NULL) {
 }
 
 
-
 /**
  * Moves an uploaded file to a new location.
  *
@@ -1031,7 +1031,7 @@ function file_scan_directory($dir, $mask, $options = [], $depth = 0) {
   // performance boost.
   if (!isset($options['nomask'])) {
     $ignore_directories = Settings::get('file_scan_ignore_directories', []);
-    array_walk($ignore_directories, function(&$value) {
+    array_walk($ignore_directories, function (&$value) {
       $value = preg_quote($value, '/');
     });
     $default_nomask = '/^' . implode('|', $ignore_directories) . '$/';