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,13 +627,18 @@ class LeapExportElement { ...@@ -627,13 +627,18 @@ class LeapExportElement {
} }
/** /**
* The id of the entry's author * The name of the entry's author
* Override this if the author is different from the portfolio holder
* *
* @return int * @return string
*/ */
public function get_entry_author() { public function get_entry_author() {
return; if ($author = $this->artefact->get('author')) {
if ($author != $this->artefact->get('owner')) {
return display_name($author);
}
return;
}
return $this->artefact->get('authorname');
} }
/** /**
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
<title>{$title|escape}</title> <title>{$title|escape}</title>
<id>{$id}</id> <id>{$id}</id>
{if $author} <author> {if $author} <author>
<name>{$author|display_name|escape}</name> <name>{$author|escape}</name>
</author> </author>
{/if} {/if}
{if $updated} <updated>{$updated}</updated>{/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