Commit 93b59a16 authored by Martyn Smith's avatar Martyn Smith Committed by Martyn Smith
Browse files

Added format support

parent d96b577b
......@@ -29,10 +29,11 @@ require(dirname(dirname(__FILE__)) . '/init.php');
require_once('artefact.php');
$id = param_integer('id');
$artefact = artefact_instance_from_id($id);
$renderedartefact = $artefact->render(FORMAT_ARTEFACT_LISTSELF, null);
$format = param_variable('format', FORMAT_ARTEFACT_LISTSELF);
log_debug($renderedartefact);
$artefact = artefact_instance_from_id($id);
log_debug('rendering to format: ' . $format);
$renderedartefact = $artefact->render($format, null);
if (!$renderedartefact) {
json_reply('local', 'artefactnotrendered');
......
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