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