mirror of
https://github.com/moodle/moodle.git
synced 2025-01-19 14:27:22 +01:00
Merge branch 'MDL-42772-master' of git://github.com/FMCorz/moodle
This commit is contained in:
commit
e3552170da
@ -2831,5 +2831,21 @@ function xmldb_main_upgrade($oldversion) {
|
||||
upgrade_main_savepoint(true, 2013110600.01);
|
||||
}
|
||||
|
||||
if ($oldversion < 2013110600.02) {
|
||||
|
||||
// If the user is logged in, we ensure that the alternate name fields are present
|
||||
// in the session. It will not be the case when upgrading from 2.5 downwards.
|
||||
if (!empty($USER->id)) {
|
||||
$refreshuser = $DB->get_record('user', array('id' => $USER->id));
|
||||
$fields = array('firstnamephonetic', 'lastnamephonetic', 'middlename', 'alternatename', 'firstname', 'lastname');
|
||||
foreach ($fields as $field) {
|
||||
$USER->{$field} = $refreshuser->{$field};
|
||||
}
|
||||
}
|
||||
|
||||
// Main savepoint reached.
|
||||
upgrade_main_savepoint(true, 2013110600.02);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
@ -29,7 +29,7 @@
|
||||
|
||||
defined('MOODLE_INTERNAL') || die();
|
||||
|
||||
$version = 2013110600.01; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
$version = 2013110600.02; // YYYYMMDD = weekly release date of this DEV branch.
|
||||
// RR = release increments - 00 in DEV branches.
|
||||
// .XX = incremental changes.
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user