comparison core/modules/update/update.manager.inc @ 14:1fec387a4317

Update Drupal core to 8.5.2 via Composer
author Chris Cannam
date Mon, 23 Apr 2018 09:46:53 +0100
parents 4c8ae668cc8c
children 129ea1e6d783
comparison
equal deleted inserted replaced
13:5fb285c0d0e3 14:1fec387a4317
206 function update_manager_file_get($url) { 206 function update_manager_file_get($url) {
207 $parsed_url = parse_url($url); 207 $parsed_url = parse_url($url);
208 $remote_schemes = ['http', 'https', 'ftp', 'ftps', 'smb', 'nfs']; 208 $remote_schemes = ['http', 'https', 'ftp', 'ftps', 'smb', 'nfs'];
209 if (!isset($parsed_url['scheme']) || !in_array($parsed_url['scheme'], $remote_schemes)) { 209 if (!isset($parsed_url['scheme']) || !in_array($parsed_url['scheme'], $remote_schemes)) {
210 // This is a local file, just return the path. 210 // This is a local file, just return the path.
211 return drupal_realpath($url); 211 return \Drupal::service('file_system')->realpath($url);
212 } 212 }
213 213
214 // Check the cache and download the file if needed. 214 // Check the cache and download the file if needed.
215 $cache_directory = _update_manager_cache_directory(); 215 $cache_directory = _update_manager_cache_directory();
216 $local = $cache_directory . '/' . drupal_basename($parsed_url['path']); 216 $local = $cache_directory . '/' . drupal_basename($parsed_url['path']);