function _system_check_array_table_prefixes in Drupal 9
Checks if there are 'prefix' entries in array format for tables.
1 call to _system_check_array_table_prefixes()
- system_requirements in core/
modules/ system/ system.install - Implements hook_requirements().
File
- core/
modules/ system/ system.install, line 1528 - Install, update and uninstall functions for the system module.
Code
function _system_check_array_table_prefixes($app_root, $site_path) {
if (is_readable($app_root . '/' . $site_path . '/settings.php')) {
include $app_root . '/' . $site_path . '/settings.php';
}
if (empty($databases)) {
return FALSE;
}
foreach ($databases as $database) {
foreach ($database as $target) {
if (isset($target['prefix']) && is_array($target['prefix'])) {
return TRUE;
}
}
}
return FALSE;
}