Commit 28c41c60 authored by Nigel McNie's avatar Nigel McNie Committed by Nigel McNie
Browse files

Changed to accept an array of ids in the case of listself.

parent 27090417
......@@ -94,13 +94,16 @@ function createview4_submit($values) {
insert_record('view_content', $viewcontent);
}
else if ($blockdata['type'] == 'artefact') {
$viewartefact = new StdClass;
$viewartefact->view = $viewid;
$viewartefact->artefact = $blockdata['id'];
$viewartefact->block = $block;
$viewartefact->ctime = $time;
$viewartefact->format = $blockdata['format'];
insert_record('view_artefact', $viewartefact);
$blockdata['id'] = (array)$blockdata['id'];
foreach ($blockdata['id'] as $id) {
$viewartefact = new StdClass;
$viewartefact->view = $viewid;
$viewartefact->artefact = $id;
$viewartefact->block = $block;
$viewartefact->ctime = $time;
$viewartefact->format = $blockdata['format'];
insert_record('view_artefact', $viewartefact);
}
}
else {
throw new OMGWTFException();
......
Supports Markdown
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