Commit 5550902a authored by Richard Mansfield's avatar Richard Mansfield
Browse files

Allow for anonymous authors in artefact export


Signed-off-by: default avatarRichard Mansfield <richardm@catalyst.net.nz>
parent eda4ad16
......@@ -627,14 +627,19 @@ class LeapExportElement {
}
/**
* The id of the entry's author
* Override this if the author is different from the portfolio holder
* The name of the entry's author
*
* @return int
* @return string
*/
public function get_entry_author() {
if ($author = $this->artefact->get('author')) {
if ($author != $this->artefact->get('owner')) {
return display_name($author);
}
return;
}
return $this->artefact->get('authorname');
}
/**
* The relationship this artefact has to a view.
......
......@@ -2,7 +2,7 @@
<title>{$title|escape}</title>
<id>{$id}</id>
{if $author} <author>
<name>{$author|display_name|escape}</name>
<name>{$author|escape}</name>
</author>
{/if}
{if $updated} <updated>{$updated}</updated>{/if}
......
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