| Línea 480... |
Línea 480... |
| 480 |
$results = array_merge($results, $phpsetting_results);
|
480 |
$results = array_merge($results, $phpsetting_results);
|
| Línea 481... |
Línea 481... |
| 481 |
|
481 |
|
| 482 |
$custom_results = environment_custom_checks($version, $env_select);
|
482 |
$custom_results = environment_custom_checks($version, $env_select);
|
| Línea -... |
Línea 483... |
| - |
|
483 |
$results = array_merge($results, $custom_results);
|
| - |
|
484 |
|
| - |
|
485 |
// Locate any installed plugins belonging to deleted plugin types and block the install/upgrade process until they are removed.
|
| - |
|
486 |
// Plugins on disk which aren't installed and which are either deprecated or deleted will be ignored by install/upgrade anyway,
|
| - |
|
487 |
// so are not checked here.
|
| - |
|
488 |
$pluginman = \core_plugin_manager::instance();
|
| - |
|
489 |
foreach (core_component::get_deleted_plugin_types() as $plugintype => $dir) {
|
| - |
|
490 |
foreach ($pluginman->get_installed_plugins($plugintype) as $name => $version) {
|
| - |
|
491 |
$plugin = $plugintype . '_' . $name;
|
| - |
|
492 |
|
| - |
|
493 |
$result = new environment_results('custom_check');
|
| - |
|
494 |
$result->setInfo('Deleted plugin detected');
|
| - |
|
495 |
$result->setFeedbackStr(['deletedplugintypesdetected', 'admin', $plugin]);
|
| - |
|
496 |
$result->setStatus(false);
|
| - |
|
497 |
$result->plugin = $plugin;
|
| - |
|
498 |
$results[] = $result;
|
| - |
|
499 |
}
|
| 483 |
$results = array_merge($results, $custom_results);
|
500 |
}
|
| 484 |
|
501 |
|
| 485 |
// Always use the plugin directory version of environment.xml,
|
502 |
// Always use the plugin directory version of environment.xml,
|
| 486 |
// add-on developers need to keep those up-to-date with future info.
|
503 |
// add-on developers need to keep those up-to-date with future info.
|
| 487 |
foreach (core_component::get_plugin_types() as $plugintype => $unused) {
|
504 |
foreach (core_component::get_plugin_types() as $plugintype => $unused) {
|
| Línea 1051... |
Línea 1068... |
| 1051 |
/// Now search the version we are using (depending of vendor)
|
1068 |
/// Now search the version we are using (depending of vendor)
|
| 1052 |
$current_vendor = $DB->get_dbvendor();
|
1069 |
$current_vendor = $DB->get_dbvendor();
|
| Línea 1053... |
Línea 1070... |
| 1053 |
|
1070 |
|
| 1054 |
$dbinfo = $DB->get_server_info();
|
1071 |
$dbinfo = $DB->get_server_info();
|
| 1055 |
$current_version = normalize_version($dbinfo['version']);
|
- |
|
| Línea 1056... |
Línea 1072... |
| 1056 |
$needed_version = $vendors[$current_vendor];
|
1072 |
$current_version = normalize_version($dbinfo['version']);
|
| 1057 |
|
1073 |
|
| 1058 |
/// Check we have a needed version
|
1074 |
// Check we have a needed version.
|
| 1059 |
if (!$needed_version) {
|
1075 |
if (empty($vendors[$current_vendor])) {
|
| 1060 |
$result->setStatus(false);
|
1076 |
$result->setStatus(false);
|
| 1061 |
$result->setErrorCode(NO_DATABASE_VENDOR_VERSION_FOUND);
|
1077 |
$result->setErrorCode(NO_DATABASE_VENDOR_VERSION_FOUND);
|
| Línea -... |
Línea 1078... |
| - |
|
1078 |
return $result;
|
| - |
|
1079 |
}
|
| 1062 |
return $result;
|
1080 |
|
| 1063 |
}
|
1081 |
$needed_version = $vendors[$current_vendor];
|
| 1064 |
|
1082 |
|
| 1065 |
// Check if the DB Vendor has been properly configured.
|
1083 |
// Check if the DB Vendor has been properly configured.
|
| 1066 |
// Hack: this is required when playing with MySQL and MariaDB since they share the same PHP module and base DB classes,
|
1084 |
// Hack: this is required when playing with MySQL and MariaDB since they share the same PHP module and base DB classes,
|
| Línea 1696... |
Línea 1714... |
| 1696 |
* @return bool result of version check
|
1714 |
* @return bool result of version check
|
| 1697 |
*/
|
1715 |
*/
|
| 1698 |
function restrict_php_version_83($result) {
|
1716 |
function restrict_php_version_83($result) {
|
| 1699 |
return restrict_php_version($result, '8.3');
|
1717 |
return restrict_php_version($result, '8.3');
|
| 1700 |
}
|
1718 |
}
|
| - |
|
1719 |
|
| - |
|
1720 |
/**
|
| - |
|
1721 |
* Check if the current PHP version is greater than or equal to
|
| - |
|
1722 |
* PHP version 8.4
|
| - |
|
1723 |
*
|
| - |
|
1724 |
* @param \environment_results $result an environment_results instance
|
| - |
|
1725 |
* @return bool result of version check
|
| - |
|
1726 |
*/
|
| - |
|
1727 |
function restrict_php_version_84(environment_results $result) {
|
| - |
|
1728 |
return restrict_php_version($result, '8.4');
|
| - |
|
1729 |
}
|