Mercurial > hg > isophonics-drupal-site
comparison core/includes/common.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 | 7a779792577d |
children | c2387f117808 |
comparison
equal
deleted
inserted
replaced
13:5fb285c0d0e3 | 14:1fec387a4317 |
---|---|
1258 * for the specified file, already bound to that file. | 1258 * for the specified file, already bound to that file. |
1259 * If no appropriate archiver class was found, will return FALSE. | 1259 * If no appropriate archiver class was found, will return FALSE. |
1260 */ | 1260 */ |
1261 function archiver_get_archiver($file) { | 1261 function archiver_get_archiver($file) { |
1262 // Archivers can only work on local paths | 1262 // Archivers can only work on local paths |
1263 $filepath = drupal_realpath($file); | 1263 $filepath = \Drupal::service('file_system')->realpath($file); |
1264 if (!is_file($filepath)) { | 1264 if (!is_file($filepath)) { |
1265 throw new Exception(t('Archivers can only operate on local files: %file not supported', ['%file' => $file])); | 1265 throw new Exception(t('Archivers can only operate on local files: %file not supported', ['%file' => $file])); |
1266 } | 1266 } |
1267 return \Drupal::service('plugin.manager.archiver')->getInstance(['filepath' => $filepath]); | 1267 return \Drupal::service('plugin.manager.archiver')->getInstance(['filepath' => $filepath]); |
1268 } | 1268 } |