Merge branch 'MDL-71390-35' of git://github.com/marinaglancy/moodle into MOODLE_35_STABLE
This commit is contained in:
@@ -3527,6 +3527,8 @@
|
||||
<ON_CHECK message="sixtyfourbitswarning" />
|
||||
</FEEDBACK>
|
||||
</CUSTOM_CHECK>
|
||||
<CUSTOM_CHECK file="lib/upgradelib.php" function="check_max_input_vars" level="optional">
|
||||
</CUSTOM_CHECK>
|
||||
</CUSTOM_CHECKS>
|
||||
</MOODLE>
|
||||
</COMPATIBILITY_MATRIX>
|
||||
|
||||
@@ -1050,6 +1050,8 @@ $string['sessioncookiepath'] = 'Cookie path';
|
||||
$string['sessionhandling'] = 'Session handling';
|
||||
$string['sessiontimeout'] = 'Timeout';
|
||||
$string['settingfileuploads'] = 'File uploading is required for normal operation, please enable it in PHP configuration.';
|
||||
$string['settingmaxinputvars'] = 'PHP setting max_input_vars is recommended to be at least 5000.';
|
||||
$string['settingmaxinputvarsrequired'] = 'PHP setting max_input_vars must be at least 5000.';
|
||||
$string['settingmemorylimit'] = 'Insufficient memory detected, please set higher memory limit in PHP settings.';
|
||||
$string['settingsafemode'] = 'Moodle is not fully compatible with safe mode, please ask server administrator to turn it off. Running Moodle under safe mode is not supported, please expect various problems if you do so.';
|
||||
$string['setupsearchengine'] = 'Setup search engine';
|
||||
|
||||
@@ -2717,3 +2717,27 @@ function upgrade_find_theme_location($themename) {
|
||||
|
||||
return $dir;
|
||||
}
|
||||
|
||||
/**
|
||||
* Environment check for the php setting max_input_vars
|
||||
*
|
||||
* @param environment_results $result
|
||||
* @return environment_results|null
|
||||
*/
|
||||
function check_max_input_vars(environment_results $result) {
|
||||
$max = (int)ini_get('max_input_vars');
|
||||
if ($max < 5000) {
|
||||
$result->setInfo('max_input_vars');
|
||||
$result->setStatus(false);
|
||||
if (PHP_VERSION_ID >= 80000) {
|
||||
// For PHP8 this check is required.
|
||||
$result->setLevel('required');
|
||||
$result->setFeedbackStr('settingmaxinputvarsrequired');
|
||||
} else {
|
||||
// For PHP7 this check is optional (recommended).
|
||||
$result->setFeedbackStr('settingmaxinputvars');
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user