Commit d374ec0b authored by Robert Lyon's avatar Robert Lyon

Bug 1750925: Tidy up database for blocks that set their title via plugin

The 'myviews', 'mygroups', 'myfriends', 'wall' blocks all set their
title via the plugin so we don't need to set their title in
block_instance table.

Currently we are saving the 'myviews' one with broken lang string title

behatnotneeded

Change-Id: Ie583678e2a1bb650513f873024f49269b6e66912
Signed-off-by: Robert Lyon's avatarRobert Lyon <robertl@catalyst.net.nz>
parent c44c2def
......@@ -5754,5 +5754,10 @@ function xmldb_core_upgrade($oldversion=0) {
}
}
if ($oldversion < 2018022200) {
log_debug('Removing confusing blockinstance title information');
execute_sql("UPDATE {block_instance} SET title = '' WHERE blocktype IN ('myviews', 'mygroups', 'myfriends', 'wall')");
}
return $status;
}
......@@ -2680,7 +2680,7 @@ function install_system_profile_view() {
foreach (array_keys($blocktypes) as $blocktype) {
if (in_array($blocktype, $installed)) {
$weights[$blocktypes[$blocktype]]++;
$title = ($blocktype == 'profileinfo') ? get_string('aboutme', 'blocktype.internal/profileinfo') : get_string('title', 'blocktype.' . $blocktype);
$title = ($blocktype == 'profileinfo') ? get_string('aboutme', 'blocktype.internal/profileinfo') : '';
$newblock = new BlockInstance(0, array(
'blocktype' => $blocktype,
'title' => $title,
......
......@@ -16,7 +16,7 @@ $config = new stdClass();
// See https://wiki.mahara.org/wiki/Developer_Area/Version_Numbering_Policy
// For upgrades on stable branches, increment the version by one. On master, use the date.
$config->version = 2018022100;
$config->version = 2018022200;
$config->series = '18.04';
$config->release = '18.04dev';
$config->minupgradefrom = 2015030409;
......
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