Commit cfa21585 authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Add comment to upgrade

parent 0b109aa9
...@@ -1356,6 +1356,7 @@ function xmldb_core_upgrade($oldversion=0) { ...@@ -1356,6 +1356,7 @@ function xmldb_core_upgrade($oldversion=0) {
} }
// migrate all users to their default profile view // migrate all users to their default profile view
// These profile views are deleted in the next upgrade.
if ($userids = get_column('usr', 'id')) { if ($userids = get_column('usr', 'id')) {
foreach ($userids as $user) { foreach ($userids as $user) {
install_default_profile_view(array('id' => $user)); install_default_profile_view(array('id' => $user));
...@@ -1373,6 +1374,7 @@ function xmldb_core_upgrade($oldversion=0) { ...@@ -1373,6 +1374,7 @@ function xmldb_core_upgrade($oldversion=0) {
// Delete all the empty profile views & recreate them from the // Delete all the empty profile views & recreate them from the
// site template. // site template.
$viewids = get_column('view', 'id', 'type', 'profile'); $viewids = get_column('view', 'id', 'type', 'profile');
if ($viewids) { if ($viewids) {
require_once(get_config('libroot') . 'view.php'); require_once(get_config('libroot') . 'view.php');
...@@ -1393,7 +1395,7 @@ function xmldb_core_upgrade($oldversion=0) { ...@@ -1393,7 +1395,7 @@ function xmldb_core_upgrade($oldversion=0) {
} }
// This record already exists on an install from scratch, but // This record already exists on an install from scratch, but
// not on an upgrade // not in an upgrade
if (!record_exists('event_subscription', 'event', 'createuser', 'callfunction', 'install_default_profile_view')) { if (!record_exists('event_subscription', 'event', 'createuser', 'callfunction', 'install_default_profile_view')) {
insert_record('event_subscription', (object)array('event' => 'createuser', 'callfunction' => 'install_default_profile_view')); insert_record('event_subscription', (object)array('event' => 'createuser', 'callfunction' => 'install_default_profile_view'));
} }
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment