Commit 04238f92 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1839223: When creating a page via tags, the copied blocks have the...

Merge "Bug 1839223: When creating a page via tags, the copied blocks have the wrong text for the tags"
parents 1b2123ce 1ea01a36
......@@ -855,6 +855,14 @@ function set_view_title_and_description(Pieform $form, $values) {
foreach($bv['ids'] as $bid) {
$configdata = unserialize(get_field('block_instance', 'configdata', 'id', $bid));
$tags = get_column('tag', 'tag', 'resourcetype', 'blocktype', 'resourceid', $bid);
foreach($tags as &$t) {
if (preg_match('/^tagid\_(.*)/', $t, $matches)) {
if ($itag = get_record('tag', 'id', $matches[1])) {
$instname = get_field('institution', 'displayname', 'id', $itag->resourceid);
$t = $instname . ': ' . $itag->tag;
}
}
}
$id = create_block($bk, $configdata, $view, $currentcolumn, array('oldid' => $bid, 'tags' => $tags));
$currentcolumn = (($currentcolumn +1) % $maxcols) ? ($currentcolumn +1) % $maxcols : $maxcols;
}
......
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