mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 12:05:37 +00:00
Merge pull request #9361 from kinglozzer/configure-database-glob
Minor performance improvement in DatabaseAdapterRegistry::autoconfigure()
This commit is contained in:
commit
bdc723ff69
@ -145,12 +145,8 @@ class DatabaseAdapterRegistry
|
|||||||
$databaseConfig = $config;
|
$databaseConfig = $config;
|
||||||
}
|
}
|
||||||
// Search through all composer packages in vendor, updating $databaseConfig
|
// Search through all composer packages in vendor, updating $databaseConfig
|
||||||
foreach (glob(BASE_PATH . '/vendor/*', GLOB_ONLYDIR) as $vendor) {
|
foreach (glob(BASE_PATH . '/vendor/*/*/_configure_database.php') as $configFile) {
|
||||||
foreach (glob($vendor . '/*', GLOB_ONLYDIR) as $directory) {
|
include_once $configFile;
|
||||||
if (file_exists($directory . '/_configure_database.php')) {
|
|
||||||
include_once($directory . '/_configure_database.php');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
// Update modified variable
|
// Update modified variable
|
||||||
$config = $databaseConfig;
|
$config = $databaseConfig;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user