Merge branch 'MDL-76033-master' of https://github.com/ilyatregubov/moodle

This commit is contained in:
Víctor Déniz 2022-10-20 00:07:53 +01:00
commit fb74611571
3 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,8 @@
require_once('lib.php');
require_once($CFG->libdir.'/completionlib.php');
redirect_if_major_upgrade_required();
$id = optional_param('id', 0, PARAM_INT);
$name = optional_param('name', '', PARAM_TEXT);
$edit = optional_param('edit', -1, PARAM_BOOL);

View File

@ -1411,7 +1411,7 @@ function disable_output_buffering() {
*/
function is_major_upgrade_required() {
global $CFG;
$lastmajordbchanges = 2022022200.00;
$lastmajordbchanges = 2022101400.03; // This should be the version where the breaking changes happen.
$required = empty($CFG->version);
$required = $required || (float)$CFG->version < $lastmajordbchanges;

View File

@ -40,6 +40,8 @@ require_once(__DIR__ . '/../config.php');
require_once($CFG->dirroot . '/my/lib.php');
require_once($CFG->libdir.'/adminlib.php');
redirect_if_major_upgrade_required();
$resetall = optional_param('resetall', false, PARAM_BOOL);
$pagetitle = get_string('mypage', 'admin');