Include update date in atom feed regardless of the number of entries
Include update date in atom feed regardless of the number of entries

{* {*
* atom.tpl * atom.tpl
* gitphp: A PHP git repository browser * gitphp: A PHP git repository browser
* Component: Atom feed template * Component: Atom feed template
* *
* Copyright (C) 2010 Christian Weiske <cweiske@cweiske.de> * Copyright (C) 2010 Christian Weiske <cweiske@cweiske.de>
*} *}
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en"> <feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
<title>{$project->GetProject()}</title> <title>{$project->GetProject()}</title>
<subtitle type="text">{$project->GetProject()} log</subtitle> <subtitle type="text">{$project->GetProject()} log</subtitle>
<link href="{geturl fullurl=true project=$project}"/> <link href="{geturl fullurl=true project=$project}"/>
<link rel="self" href="{geturl fullurl=true project=$project action=atom}"/> <link rel="self" href="{geturl fullurl=true project=$project action=atom}"/>
<id>{geturl fullurl=true project=$project}</id> <id>{geturl fullurl=true project=$project}</id>
{if $log->GetCount()>0} {if $log->GetHead()}
<updated>{$log->GetHead()->GetCommitterEpoch()|date_format:"%Y-%m-%dT%H:%M:%S+00:00"}</updated> <updated>{$log->GetHead()->GetCommitterEpoch()|date_format:"%Y-%m-%dT%H:%M:%S+00:00"}</updated>
{/if} {/if}
   
{foreach from=$log item=logitem} {foreach from=$log item=logitem}
<entry> <entry>
<id>{geturl fullurl=true project=$project action=commit hash=$logitem}</id> <id>{geturl fullurl=true project=$project action=commit hash=$logitem}</id>
<title>{$logitem->GetTitle()|escape:'html'}</title> <title>{$logitem->GetTitle()|escape:'html'}</title>
<author> <author>
<name>{$logitem->GetAuthorName()|escape:'html'}</name> <name>{$logitem->GetAuthorName()|escape:'html'}</name>
</author> </author>
<published>{$logitem->GetCommitterEpoch()|date_format:"%Y-%m-%dT%H:%M:%S+00:00"}</published> <published>{$logitem->GetCommitterEpoch()|date_format:"%Y-%m-%dT%H:%M:%S+00:00"}</published>
<updated>{$logitem->GetCommitterEpoch()|date_format:"%Y-%m-%dT%H:%M:%S+00:00"}</updated> <updated>{$logitem->GetCommitterEpoch()|date_format:"%Y-%m-%dT%H:%M:%S+00:00"}</updated>
<link rel="alternate" href="{geturl fullurl=true project=$project action=commit hash=$logitem}"/> <link rel="alternate" href="{geturl fullurl=true project=$project action=commit hash=$logitem}"/>
<summary>{$logitem->GetTitle()|escape:'html'}</summary> <summary>{$logitem->GetTitle()|escape:'html'}</summary>
<content type="xhtml"> <content type="xhtml">
<div xmlns="http://www.w3.org/1999/xhtml"> <div xmlns="http://www.w3.org/1999/xhtml">
<p> <p>
{foreach from=$logitem->GetComment() item=line} {foreach from=$logitem->GetComment() item=line}
{$line|htmlspecialchars}<br /> {$line|htmlspecialchars}<br />
{/foreach} {/foreach}
</p> </p>
<ul> <ul>
{foreach from=$logitem->DiffToParent($gitexe) item=diffline} {foreach from=$logitem->DiffToParent($gitexe) item=diffline}
<li>{$diffline->GetToFile()|htmlspecialchars}</li> <li>{$diffline->GetToFile()|htmlspecialchars}</li>
{/foreach} {/foreach}
</ul> </ul>
</div> </div>
</content> </content>
</entry> </entry>
{/foreach} {/foreach}
   
</feed> </feed>
   
comments