Remove extraneous pipe, fix diff output links
Remove extraneous pipe, fix diff output links

{* {*
* commitdiff.tpl * commitdiff.tpl
* gitphp: A PHP git repository browser * gitphp: A PHP git repository browser
* Component: Commitdiff view template * Component: Commitdiff view template
* *
* Copyright (C) 2009 Christopher Han <xiphux@gmail.com> * Copyright (C) 2009 Christopher Han <xiphux@gmail.com>
*} *}
{include file='header.tpl'} {include file='header.tpl'}
   
{* Nav *} {* Nav *}
<div class="page_nav"> <div class="page_nav">
{if $commit} {if $commit}
{assign var=tree value=$commit->GetTree()} {assign var=tree value=$commit->GetTree()}
{/if} {/if}
{include file='nav.tpl' current='commitdiff' logcommit=$commit treecommit=$commit} {include file='nav.tpl' current='commitdiff' logcommit=$commit treecommit=$commit}
<br /> <br />
{if $sidebyside} {if $sidebyside}
| <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=commitdiff&amp;h={$commit->GetHash()}&amp;{if $hashparent}&amp;hp={$hashparent}{/if};o=unified">{t}unified{/t}</a> <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=commitdiff&amp;h={$commit->GetHash()}{if $hashparent}&amp;hp={$hashparent}{/if}&amp;o=unified">{t}unified{/t}</a>
{else} {else}
| <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=commitdiff&amp;h={$commit->GetHash()}&amp;{if $hashparent}&amp;hp={$hashparent}{/if};o=sidebyside">{t}side by side{/t}</a> <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=commitdiff&amp;h={$commit->GetHash()}{if $hashparent}&amp;hp={$hashparent}{/if}&amp;o=sidebyside">{t}side by side{/t}</a>
{/if} {/if}
| <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=commitdiff_plain&amp;h={$commit->GetHash()}{if $hashparent}&amp;hp={$hashparent}{/if}">{t}plain{/t}</a> | <a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=commitdiff_plain&amp;h={$commit->GetHash()}{if $hashparent}&amp;hp={$hashparent}{/if}">{t}plain{/t}</a>
</div> </div>
   
{include file='title.tpl' titlecommit=$commit} {include file='title.tpl' titlecommit=$commit}
<div class="page_body"> <div class="page_body">
{assign var=bugpattern value=$project->GetBugPattern()} {assign var=bugpattern value=$project->GetBugPattern()}
{assign var=bugurl value=$project->GetBugUrl()} {assign var=bugurl value=$project->GetBugUrl()}
{foreach from=$commit->GetComment() item=line} {foreach from=$commit->GetComment() item=line}
{$line|htmlspecialchars|buglink:$bugpattern:$bugurl}<br /> {$line|htmlspecialchars|buglink:$bugpattern:$bugurl}<br />
{/foreach} {/foreach}
<br /> <br />
{* Diff each file changed *} {* Diff each file changed *}
{foreach from=$treediff item=filediff} {foreach from=$treediff item=filediff}
<div class="diff_info"> <div class="diff_info">
{if ($filediff->GetStatus() == 'D') || ($filediff->GetStatus() == 'M')} {if ($filediff->GetStatus() == 'D') || ($filediff->GetStatus() == 'M')}
{assign var=localfromtype value=$filediff->GetFromFileType(1)} {assign var=localfromtype value=$filediff->GetFromFileType(1)}
{$localfromtype}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=blob&amp;h={$filediff->GetFromHash()}&amp;hb={$commit->GetHash()}{if $filediff->GetFromFile()}&amp;f={$filediff->GetFromFile()}{/if}">{if $filediff->GetFromFile()}a/{$filediff->GetFromFile()}{else}{$filediff->GetFromHash()}{/if}</a> {$localfromtype}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=blob&amp;h={$filediff->GetFromHash()}&amp;hb={$commit->GetHash()}{if $filediff->GetFromFile()}&amp;f={$filediff->GetFromFile()}{/if}">{if $filediff->GetFromFile()}a/{$filediff->GetFromFile()}{else}{$filediff->GetFromHash()}{/if}</a>
{if $filediff->GetStatus() == 'D'} {if $filediff->GetStatus() == 'D'}
{t}(deleted){/t} {t}(deleted){/t}
{/if} {/if}
{/if} {/if}
   
{if $filediff->GetStatus() == 'M'} {if $filediff->GetStatus() == 'M'}
-&gt; -&gt;
{/if} {/if}
   
{if ($filediff->GetStatus() == 'A') || ($filediff->GetStatus() == 'M')} {if ($filediff->GetStatus() == 'A') || ($filediff->GetStatus() == 'M')}
{assign var=localtotype value=$filediff->GetToFileType(1)} {assign var=localtotype value=$filediff->GetToFileType(1)}
{$localtotype}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=blob&amp;h={$filediff->GetToHash()}&amp;hb={$commit->GetHash()}{if $filediff->GetToFile()}&amp;f={$filediff->GetToFile()}{/if}">{if $filediff->GetToFile()}b/{$filediff->GetToFile()}{else}{$filediff->GetToHash()}{/if}</a> {$localtotype}:<a href="{$SCRIPT_NAME}?p={$project->GetProject()|urlencode}&amp;a=blob&amp;h={$filediff->GetToHash()}&amp;hb={$commit->GetHash()}{if $filediff->GetToFile()}&amp;f={$filediff->GetToFile()}{/if}">{if $filediff->GetToFile()}b/{$filediff->GetToFile()}{else}{$filediff->GetToHash()}{/if}</a>
   
{if $filediff->GetStatus() == 'A'} {if $filediff->GetStatus() == 'A'}
{t}(new){/t} {t}(new){/t}
{/if} {/if}
{/if} {/if}
</div> </div>
{if $sidebyside} {if $sidebyside}
{include file='filediffsidebyside.tpl' diffsplit=$filediff->GetDiffSplit()} {include file='filediffsidebyside.tpl' diffsplit=$filediff->GetDiffSplit()}
{else} {else}
{include file='filediff.tpl' diff=$filediff->GetDiff('', true, true)} {include file='filediff.tpl' diff=$filediff->GetDiff('', true, true)}
{/if} {/if}
{/foreach} {/foreach}
</div> </div>
   
{include file='footer.tpl'} {include file='footer.tpl'}
   
   
comments