mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
Merge branch 'MDL-42772-master' of git://github.com/FMCorz/moodle
This commit is contained in:
commit
e3552170da
2 changed files with 17 additions and 1 deletions
|
@ -2831,5 +2831,21 @@ function xmldb_main_upgrade($oldversion) {
|
||||||
upgrade_main_savepoint(true, 2013110600.01);
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
|
@ -29,7 +29,7 @@
|
||||||
|
|
||||||
defined('MOODLE_INTERNAL') || die();
|
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.
|
// RR = release increments - 00 in DEV branches.
|
||||||
// .XX = incremental changes.
|
// .XX = incremental changes.
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue