mirror of
https://github.com/moodle/moodle.git
synced 2025-04-20 16:04:25 +02:00
Merge branch 'MDL-74434-master' of https://github.com/mihailges/moodle
This commit is contained in:
commit
bdf12da661
@ -101,6 +101,12 @@ function xmldb_block_tag_youtube_upgrade($oldversion) {
|
||||
// If the block uses a legacy category name, update it to use the current category ID instead.
|
||||
foreach ($blockinstances as $blockinstance) {
|
||||
$blockconfig = unserialize(base64_decode($blockinstance->configdata));
|
||||
|
||||
// Skip if the block does not have a specific category set.
|
||||
if (!isset($blockconfig->category)) {
|
||||
continue;
|
||||
}
|
||||
|
||||
$blockcategoryconfig = $blockconfig->category;
|
||||
// The block is using a legacy category name as a category config.
|
||||
if (array_key_exists($blockcategoryconfig, $categorynamemap)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user