Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Core/Updater/Updater.php @ 17:129ea1e6d783
Update, including to Drupal core 8.6.10
author | Chris Cannam |
---|---|
date | Thu, 28 Feb 2019 13:21:36 +0000 |
parents | 4c8ae668cc8c |
children | af1871eacc83 |
comparison
equal
deleted
inserted
replaced
16:c2387f117808 | 17:129ea1e6d783 |
---|---|
1 <?php | 1 <?php |
2 | 2 |
3 namespace Drupal\Core\Updater; | 3 namespace Drupal\Core\Updater; |
4 | 4 |
5 use Drupal\Component\Utility\Unicode; | |
6 use Drupal\Core\FileTransfer\FileTransferException; | 5 use Drupal\Core\FileTransfer\FileTransferException; |
7 use Drupal\Core\FileTransfer\FileTransfer; | 6 use Drupal\Core\FileTransfer\FileTransfer; |
8 | 7 |
9 /** | 8 /** |
10 * Defines the base class for Updaters used in Drupal. | 9 * Defines the base class for Updaters used in Drupal. |
110 $info_files = file_scan_directory($directory, '/.*\.info.yml$/'); | 109 $info_files = file_scan_directory($directory, '/.*\.info.yml$/'); |
111 if (!$info_files) { | 110 if (!$info_files) { |
112 return FALSE; | 111 return FALSE; |
113 } | 112 } |
114 foreach ($info_files as $info_file) { | 113 foreach ($info_files as $info_file) { |
115 if (Unicode::substr($info_file->filename, 0, -9) == drupal_basename($directory)) { | 114 if (mb_substr($info_file->filename, 0, -9) == drupal_basename($directory)) { |
116 // Info file Has the same name as the directory, return it. | 115 // Info file Has the same name as the directory, return it. |
117 return $info_file->uri; | 116 return $info_file->uri; |
118 } | 117 } |
119 } | 118 } |
120 // Otherwise, return the first one. | 119 // Otherwise, return the first one. |