Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cleanup: explicitely loop over PHP variables in templates #660

Merged
merged 1 commit into from
Oct 17, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions tpl/daily.html
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@
<div class="clear"></div>

{if="$linksToDisplay"}
{loop="cols"}
{loop="$cols"}
{if="isset($value[0])"}
<div id="daily_col{$counter+1}">
{loop="value"}
{loop="$value"}
{$link=$value}
<div class="dailyEntry">
<div class="dailyEntryPermalink">
Expand All @@ -60,7 +60,7 @@
{/if}
{if="$link.tags"}
<div class="dailyEntryTags">
{loop="link.taglist"}
{loop="$link.taglist"}
{$value} -
{/loop}
</div>
Expand Down
2 changes: 1 addition & 1 deletion tpl/dailyrss.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<link>{$absurl}</link>
<pubDate>{$rssdate}</pubDate>
<description><![CDATA[
{loop="links"}
{loop="$links"}
<h3><a href="{$value.url}">{$value.title}</a></h3>
<small>{if="!$hide_timestamps"}{function="strftime('%c', $value.timestamp)"} - {/if}{if="$value.tags"}{$value.tags}{/if}<br>
{$value.url}</small><br>
Expand Down
2 changes: 1 addition & 1 deletion tpl/export.bookmarks.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion tpl/feed.atom.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
</author>
<id>{$index_url}</id>
<generator>Shaarli</generator>
{loop="links"}
{loop="$links"}
<entry>
<title>{$value.title}</title>
{if="$usepermalinks"}
Expand Down
2 changes: 1 addition & 1 deletion tpl/feed.rss.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
<!-- PubSubHubbub Discovery -->
<atom:link rel="hub" href="{$pubsubhub_url}" />
{/if}
{loop="links"}
{loop="$links"}
<item>
<title>{$value.title}</title>
<guid isPermaLink="{if="$usepermalinks"}true{else}false{/if}">{$value.guid}</guid>
Expand Down
4 changes: 2 additions & 2 deletions tpl/linklist.html
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@
</div>
{/if}
<ul>
{loop="links"}
{loop="$links"}
<li{if="$value.class"} class="{$value.class}"{/if}>
<a id="{$value.shorturl}"></a>
<div class="thumbnail">{$value.url|thumbnail}</div>
Expand Down Expand Up @@ -110,7 +110,7 @@
<a href="{$value.real_url}"><span class="linkurl" title="Short link">{$value.url}</span></a><br>
{if="$value.tags"}
<div class="linktaglist">
{loop="value.taglist"}<span class="linktag" title="Add tag"><a href="?addtag={$value|urlencode}">{$value}</a></span> {/loop}
{loop="$value.taglist"}<span class="linktag" title="Add tag"><a href="?addtag={$value|urlencode}">{$value}</a></span> {/loop}
</div>
{/if}

Expand Down
2 changes: 1 addition & 1 deletion tpl/page.header.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@

{if="!empty($plugin_errors) && isLoggedIn()"}
<ul class="errors">
{loop="plugin_errors"}
{loop="$plugin_errors"}
<li>{$value}</li>
{/loop}
</ul>
Expand Down
2 changes: 1 addition & 1 deletion tpl/picwall.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

<div class="center">
<div id="picwall_container">
{loop="linksToDisplay"}
{loop="$linksToDisplay"}
<div class="picwall_pictureframe">
{$value.thumbnail}<a href="{$value.real_url}"><span class="info">{$value.title}</span></a>
{loop="$value.picwall_plugin"}
Expand Down
2 changes: 1 addition & 1 deletion tpl/tagcloud.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>

<div id="cloudtag">
{loop="tags"}
{loop="$tags"}
<span class="count">{$value.count}</span><a
href="?searchtags={$key|urlencode}" style="font-size:{$value.size}em;">{$key}</a>
{loop="$value.tag_plugin"}
Expand Down