From 0f7a91f4fa689a4084d7db5987a534b4b4fc3866 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 31 May 2012 12:11:12 +0200 Subject: [PATCH] Change code to use new way to specify filter parameters. --- .../net/pterodactylus/sone/freenet/L10nFilter.java | 7 +----- .../sone/template/CssClassNameFilter.java | 2 +- .../sone/template/ImageLinkFilter.java | 9 +++---- .../sone/template/JavascriptFilter.java | 2 +- .../pterodactylus/sone/template/ParserFilter.java | 18 ++++++-------- .../sone/template/ReplyGroupFilter.java | 2 +- .../sone/template/RequestChangeFilter.java | 23 ++++-------------- .../sone/template/SubstringFilter.java | 6 ++--- .../sone/template/UniqueElementFilter.java | 2 +- .../sone/template/UnknownDateFilter.java | 2 +- .../sone/web/ajax/EditImageAjaxPage.java | 2 +- src/main/resources/templates/about.html | 4 ++-- src/main/resources/templates/bookmarks.html | 7 +++--- src/main/resources/templates/deleteAlbum.html | 2 +- src/main/resources/templates/deleteImage.html | 2 +- src/main/resources/templates/deleteSone.html | 2 +- src/main/resources/templates/editProfile.html | 4 ++-- src/main/resources/templates/imageBrowser.html | 28 +++++++++++----------- .../resources/templates/include/browseAlbums.html | 10 ++++---- .../resources/templates/include/createSone.html | 6 ++--- src/main/resources/templates/include/head.html | 5 ++-- .../resources/templates/include/pagination.html | 8 +++---- src/main/resources/templates/include/soneMenu.html | 4 ++-- src/main/resources/templates/include/viewPost.html | 18 +++++++------- .../resources/templates/include/viewReply.html | 18 +++++++------- src/main/resources/templates/include/viewSone.html | 6 ++--- src/main/resources/templates/index.html | 5 ++-- src/main/resources/templates/invalid.html | 6 ++--- src/main/resources/templates/knownSones.html | 25 ++++++++++--------- src/main/resources/templates/new.html | 5 ++-- .../templates/notify/newVersionNotification.html | 2 +- .../templates/notify/soneInsertNotification.html | 6 ++--- .../templates/notify/wotMissingNotification.html | 2 +- src/main/resources/templates/options.html | 26 ++++++++++---------- src/main/resources/templates/viewPost.html | 2 +- src/main/resources/templates/viewSone.html | 6 ++--- 36 files changed, 126 insertions(+), 158 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/freenet/L10nFilter.java b/src/main/java/net/pterodactylus/sone/freenet/L10nFilter.java index 1cde976..7fffd5c 100644 --- a/src/main/java/net/pterodactylus/sone/freenet/L10nFilter.java +++ b/src/main/java/net/pterodactylus/sone/freenet/L10nFilter.java @@ -52,7 +52,7 @@ public class L10nFilter implements Filter { * {@inheritDoc} */ @Override - public String format(TemplateContext templateContext, Object data, Map parameters) { + public String format(TemplateContext templateContext, Object data, Map parameters) { if (parameters.isEmpty()) { return webInterface.getL10n().getString(String.valueOf(data)); } @@ -60,11 +60,6 @@ public class L10nFilter implements Filter { int parameterIndex = 0; while (parameters.containsKey(String.valueOf(parameterIndex))) { Object value = parameters.get(String.valueOf(parameterIndex)); - if (((String) value).startsWith("=")) { - value = ((String) value).substring(1); - } else { - value = templateContext.get((String) value); - } parameterValues.add(value); ++parameterIndex; } diff --git a/src/main/java/net/pterodactylus/sone/template/CssClassNameFilter.java b/src/main/java/net/pterodactylus/sone/template/CssClassNameFilter.java index 7db7be0..0282156 100644 --- a/src/main/java/net/pterodactylus/sone/template/CssClassNameFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/CssClassNameFilter.java @@ -35,7 +35,7 @@ public class CssClassNameFilter implements Filter { * {@inheritDoc} */ @Override - public Object format(TemplateContext templateContext, Object data, Map parameters) { + public Object format(TemplateContext templateContext, Object data, Map parameters) { return String.valueOf(data).replaceAll("[^a-zA-Z0-9-]", "_"); } diff --git a/src/main/java/net/pterodactylus/sone/template/ImageLinkFilter.java b/src/main/java/net/pterodactylus/sone/template/ImageLinkFilter.java index 50ce8fd..06a11d7 100644 --- a/src/main/java/net/pterodactylus/sone/template/ImageLinkFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/ImageLinkFilter.java @@ -65,7 +65,7 @@ public class ImageLinkFilter implements Filter { * {@inheritDoc} */ @Override - public Object format(TemplateContext templateContext, Object data, Map parameters) { + public Object format(TemplateContext templateContext, Object data, Map parameters) { Image image = null; if (data instanceof String) { image = core.getImage((String) data, false); @@ -75,14 +75,11 @@ public class ImageLinkFilter implements Filter { if (image == null) { return null; } - String imageClass = parameters.get("class"); + String imageClass = String.valueOf(parameters.get("class")); int maxWidth = Numbers.safeParseInteger(parameters.get("max-width"), Integer.MAX_VALUE); int maxHeight = Numbers.safeParseInteger(parameters.get("max-height"), Integer.MAX_VALUE); String mode = String.valueOf(parameters.get("mode")); - String title = parameters.get("title"); - if ((title != null) && title.startsWith("=")) { - title = String.valueOf(templateContext.get(title.substring(1))); - } + String title = String.valueOf(parameters.get("title")); TemplateContext linkTemplateContext = templateContextFactory.createTemplateContext(); linkTemplateContext.set("class", imageClass); diff --git a/src/main/java/net/pterodactylus/sone/template/JavascriptFilter.java b/src/main/java/net/pterodactylus/sone/template/JavascriptFilter.java index 966b81f..2dc963f 100644 --- a/src/main/java/net/pterodactylus/sone/template/JavascriptFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/JavascriptFilter.java @@ -36,7 +36,7 @@ public class JavascriptFilter implements Filter { * {@inheritDoc} */ @Override - public Object format(TemplateContext templateContext, Object data, Map parameters) { + public Object format(TemplateContext templateContext, Object data, Map parameters) { StringBuilder javascriptString = new StringBuilder(); javascriptString.append('"'); for (char c : String.valueOf(data).toCharArray()) { diff --git a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java index 1b46fa0..8302369 100644 --- a/src/main/java/net/pterodactylus/sone/template/ParserFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/ParserFilter.java @@ -86,20 +86,16 @@ public class ParserFilter implements Filter { * {@inheritDoc} */ @Override - public Object format(TemplateContext templateContext, Object data, Map parameters) { + public Object format(TemplateContext templateContext, Object data, Map parameters) { String text = String.valueOf(data); - int length = Numbers.safeParseInteger(parameters.get("length"), Numbers.safeParseInteger(templateContext.get(parameters.get("length")), -1)); - int cutOffLength = Numbers.safeParseInteger(parameters.get("cut-off-length"), Numbers.safeParseInteger(templateContext.get(parameters.get("cut-off-length")), length)); - String soneKey = parameters.get("sone"); - if (soneKey == null) { - soneKey = "sone"; - } - Sone sone = (Sone) templateContext.get(soneKey); - if (sone == null) { - sone = core.getSone(soneKey, false); + int length = Numbers.safeParseInteger(parameters.get("length"), Numbers.safeParseInteger(templateContext.get(String.valueOf(parameters.get("length"))), -1)); + int cutOffLength = Numbers.safeParseInteger(parameters.get("cut-off-length"), Numbers.safeParseInteger(templateContext.get(String.valueOf(parameters.get("cut-off-length"))), length)); + Object sone = parameters.get("sone"); + if (sone instanceof String) { + sone = core.getSone((String) sone, false); } FreenetRequest request = (FreenetRequest) templateContext.get("request"); - SoneTextParserContext context = new SoneTextParserContext(request, sone); + SoneTextParserContext context = new SoneTextParserContext(request, (Sone) sone); StringWriter parsedTextWriter = new StringWriter(); try { Iterable parts = soneTextParser.parse(context, new StringReader(text)); diff --git a/src/main/java/net/pterodactylus/sone/template/ReplyGroupFilter.java b/src/main/java/net/pterodactylus/sone/template/ReplyGroupFilter.java index 37d4175..ff4b64e 100644 --- a/src/main/java/net/pterodactylus/sone/template/ReplyGroupFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/ReplyGroupFilter.java @@ -42,7 +42,7 @@ public class ReplyGroupFilter implements Filter { * {@inheritDoc} */ @Override - public Object format(TemplateContext templateContext, Object data, Map parameters) { + public Object format(TemplateContext templateContext, Object data, Map parameters) { @SuppressWarnings("unchecked") List allReplies = (List) data; Map> postSones = new HashMap>(); diff --git a/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java b/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java index 45d6ba7..3a89021 100644 --- a/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/RequestChangeFilter.java @@ -33,8 +33,7 @@ import net.pterodactylus.util.template.TemplateContext; /** * This filter expects a {@link FreenetRequest} as input and outputs a * {@link URI} that is modified by the parameters. The name of the parameter is - * handed in as “name”, the value may either be stored in “value”, or in a - * template variable whose key is stored in “key”. + * handed in as “name”, the new value is stored in “value”. * * @author David ‘Bombe’ Roden */ @@ -44,24 +43,10 @@ public class RequestChangeFilter implements Filter { * {@inheritDoc} */ @Override - public Object format(TemplateContext templateContext, Object data, Map parameters) { + public Object format(TemplateContext templateContext, Object data, Map parameters) { FreenetRequest request = (FreenetRequest) data; - String name = parameters.get("name"); - String nameKey = parameters.get("nameKey"); - if (nameKey != null) { - name = String.valueOf(templateContext.get(nameKey)); - } - String key = parameters.get("key"); - String value = null; - if (key != null) { - value = String.valueOf(templateContext.get(key)); - } - if (value == null) { - value = parameters.get("value"); - } - if (value == null) { - return request.getUri(); - } + String name = String.valueOf(parameters.get("name")); + String value = String.valueOf(parameters.get("value")); Map values = new HashMap(); Collection parameterNames = request.getHttpRequest().getParameterNames(); diff --git a/src/main/java/net/pterodactylus/sone/template/SubstringFilter.java b/src/main/java/net/pterodactylus/sone/template/SubstringFilter.java index b60f4d3..005eb1f 100644 --- a/src/main/java/net/pterodactylus/sone/template/SubstringFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/SubstringFilter.java @@ -37,9 +37,9 @@ public class SubstringFilter implements Filter { * {@inheritDoc} */ @Override - public Object format(TemplateContext templateContext, Object data, Map parameters) { - String startString = parameters.get("start"); - String lengthString = parameters.get("length"); + public Object format(TemplateContext templateContext, Object data, Map parameters) { + String startString = String.valueOf(parameters.get("start")); + String lengthString = String.valueOf(parameters.get("length")); int start = 0; try { start = Integer.parseInt(startString); diff --git a/src/main/java/net/pterodactylus/sone/template/UniqueElementFilter.java b/src/main/java/net/pterodactylus/sone/template/UniqueElementFilter.java index 45c1cb8..e3ddd59 100644 --- a/src/main/java/net/pterodactylus/sone/template/UniqueElementFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/UniqueElementFilter.java @@ -36,7 +36,7 @@ public class UniqueElementFilter implements Filter { * {@inheritDoc} */ @Override - public Object format(TemplateContext templateContext, Object data, Map parameters) { + public Object format(TemplateContext templateContext, Object data, Map parameters) { if (!(data instanceof Collection)) { return data; } diff --git a/src/main/java/net/pterodactylus/sone/template/UnknownDateFilter.java b/src/main/java/net/pterodactylus/sone/template/UnknownDateFilter.java index fa68c6f..c87a97b 100644 --- a/src/main/java/net/pterodactylus/sone/template/UnknownDateFilter.java +++ b/src/main/java/net/pterodactylus/sone/template/UnknownDateFilter.java @@ -54,7 +54,7 @@ public class UnknownDateFilter implements Filter { * {@inheritDoc} */ @Override - public Object format(TemplateContext templateContext, Object data, Map parameters) { + public Object format(TemplateContext templateContext, Object data, Map parameters) { if (data instanceof Long) { if ((Long) data == 0) { return l10nHandler.getString(unknownKey); diff --git a/src/main/java/net/pterodactylus/sone/web/ajax/EditImageAjaxPage.java b/src/main/java/net/pterodactylus/sone/web/ajax/EditImageAjaxPage.java index 9e04a30..42f4285 100644 --- a/src/main/java/net/pterodactylus/sone/web/ajax/EditImageAjaxPage.java +++ b/src/main/java/net/pterodactylus/sone/web/ajax/EditImageAjaxPage.java @@ -80,7 +80,7 @@ public class EditImageAjaxPage extends JsonPage { String description = request.getHttpRequest().getParam("description").trim(); image.setTitle(title).setDescription(TextFilter.filter(request.getHttpRequest().getHeader("host"), description)); webInterface.getCore().touchConfiguration(); - return createSuccessJsonObject().put("imageId", image.getId()).put("title", image.getTitle()).put("description", image.getDescription()).put("parsedDescription", (String) parserFilter.format(new TemplateContext(), image.getDescription(), new MapBuilder().put("sone", image.getSone().getId()).get())); + return createSuccessJsonObject().put("imageId", image.getId()).put("title", image.getTitle()).put("description", image.getDescription()).put("parsedDescription", (String) parserFilter.format(new TemplateContext(), image.getDescription(), new MapBuilder().put("sone", image.getSone()).get())); } } diff --git a/src/main/resources/templates/about.html b/src/main/resources/templates/about.html index 7465529..74ea9f0 100644 --- a/src/main/resources/templates/about.html +++ b/src/main/resources/templates/about.html @@ -5,13 +5,13 @@

Sone – The Freenet Social Network Plugin, Version <% version|html>, © 2010–2012 by David ‘Bombe’ Roden.

- <%= Page.About.Flattr.Description|l10n|html|replace needle="{link}" replacement=''|replace needle="{/link}" replacement=''> + <%= Page.About.Flattr.Description|l10n|html|replace needle=="{link}" replacement==''|replace needle=="{/link}" replacement==''>

<%= Page.About.Homepage.Title|l10n|html>

- <%= Page.About.Homepage.Description|l10n|html|replace needle="{link}" replacement=''|replace needle="{/link}" replacement=''> + <%= Page.About.Homepage.Description|l10n|html|replace needle=="{link}" replacement==''|replace needle=="{/link}" replacement==''>

<%= Page.About.License.Title|l10n|html>

diff --git a/src/main/resources/templates/bookmarks.html b/src/main/resources/templates/bookmarks.html index cf4e7ce..ef2cf68 100644 --- a/src/main/resources/templates/bookmarks.html +++ b/src/main/resources/templates/bookmarks.html @@ -5,14 +5,13 @@

<%= Page.Bookmarks.Page.Title|l10n|html>

- <%= page|store key=pageParameter> - <%include include/pagination.html> + <%include include/pagination.html pageParameter==page> <%foreach posts post> <%include include/viewPost.html> <%/foreach> - <%include include/pagination.html> + <%include include/pagination.html pageParameter==page> <%if postsNotLoaded> -

<%= Page.Bookmarks.Text.PostsNotLoaded|l10n|html|replace needle='{link}' replacement=''|replace needle='{/link}' replacement=''>

+

<%= Page.Bookmarks.Text.PostsNotLoaded|l10n|html|replace needle=='{link}' replacement==''|replace needle=='{/link}' replacement==''>

<%elseif posts.empty>

<%= Page.Bookmarks.Text.NoBookmarks|l10n|html>

<%/if> diff --git a/src/main/resources/templates/deleteAlbum.html b/src/main/resources/templates/deleteAlbum.html index cb27c19..ea583fc 100644 --- a/src/main/resources/templates/deleteAlbum.html +++ b/src/main/resources/templates/deleteAlbum.html @@ -2,7 +2,7 @@

<%= Page.DeleteAlbum.Page.Title|l10n|html>

-

<%= Page.DeleteAlbum.Text.AlbumWillBeGone|l10n|replace needle="{title}" replacementKey=album.title|html>

+

<%= Page.DeleteAlbum.Text.AlbumWillBeGone|l10n|replace needle=="{title}" replacementKey==album.title|html>

diff --git a/src/main/resources/templates/deleteImage.html b/src/main/resources/templates/deleteImage.html index 68b403e..3fb89e3 100644 --- a/src/main/resources/templates/deleteImage.html +++ b/src/main/resources/templates/deleteImage.html @@ -2,7 +2,7 @@

<%= Page.DeleteImage.Page.Title|l10n|html>

-

<%= Page.DeleteImage.Text.ImageWillBeGone|l10n|replace needle="{image}" replacementKey=image.title|replace needle="{album}" replacementKey=image.album.title|html>

+

<%= Page.DeleteImage.Text.ImageWillBeGone|l10n|replace needle=="{image}" replacement=image.title|replace needle=="{album}" replacement=image.album.title|html>

diff --git a/src/main/resources/templates/deleteSone.html b/src/main/resources/templates/deleteSone.html index cc6023f..c84aeb0 100644 --- a/src/main/resources/templates/deleteSone.html +++ b/src/main/resources/templates/deleteSone.html @@ -1,6 +1,6 @@ <%include include/head.html> -

<%= Page.DeleteSone.Page.Title|l10n|replace needle="{sone}" replacementKey=currentSone.name|html>

+

<%= Page.DeleteSone.Page.Title|l10n|replace needle=="{sone}" replacement=currentSone.name|html>

<%= Page.DeleteSone.Page.Description|l10n|html>

diff --git a/src/main/resources/templates/editProfile.html b/src/main/resources/templates/editProfile.html index e140ac4..1f03bce 100644 --- a/src/main/resources/templates/editProfile.html +++ b/src/main/resources/templates/editProfile.html @@ -192,7 +192,7 @@ <%foreach currentSone.allImages image>
  • checked="checked"<%/if>/> -
    <% image|image-link max-width=48 max-height=48 mode=enlarge title==image.title>
    +
    <% image|image-link max-width==48 max-height==48 mode==enlarge title=image.title>
  • <%/foreach> @@ -232,7 +232,7 @@

    <%= Page.EditProfile.Fields.AddField.Title|l10n|html>

    <%if duplicateFieldName> -

    <%= Page.EditProfile.Error.DuplicateFieldName|l10n|replace needle="{fieldName}" replacementKey="fieldName"|html>

    +

    <%= Page.EditProfile.Error.DuplicateFieldName|l10n|replace needle=="{fieldName}" replacement=fieldName|html>

    <%/if>
    diff --git a/src/main/resources/templates/imageBrowser.html b/src/main/resources/templates/imageBrowser.html index 2d94de0..06e9ccc 100644 --- a/src/main/resources/templates/imageBrowser.html +++ b/src/main/resources/templates/imageBrowser.html @@ -312,7 +312,7 @@ <%/if> -

    <%= Page.ImageBrowser.Album.Title|l10n|replace needle='{album}' replacementKey=album.title|html>

    +

    <%= Page.ImageBrowser.Album.Title|l10n|replace needle=='{album}' replacement=album.title|html>

    @@ -375,11 +375,11 @@ <%foreach album.images image> <%first>

    <%= Page.ImageBrowser.Header.Images|l10n|html>

    <%/first> - <%if loop.count|mod divisor=3>
    <%/if> + <%if loop.count|mod divisor==3>
    <%/if>
    <% image.title|html>
    @@ -412,9 +412,9 @@ <%/if>
    - <%= false|store key=endRow> - <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if> - <%last><%= true|store key=endRow><%/last> + <%= false|store key==endRow> + <%if loop.count|mod divisor==3 offset==1><%= true|store key==endRow><%/if> + <%last><%= true|store key==endRow><%/last> <%if endRow>
    <%/if> <%/foreach> @@ -486,9 +486,9 @@ @@ -568,7 +568,7 @@ <%else> -

    <%= Page.ImageBrowser.Sone.Title|l10n|replace needle='{sone}' replacementKey=sone.niceName|html>

    +

    <%= Page.ImageBrowser.Sone.Title|l10n|replace needle=='{sone}' replacement=sone.niceName|html>

    @@ -613,9 +613,9 @@
    <% album.description|parse sone=album.sone>
    - <%= false|store key=endRow> - <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if> - <%last><%= true|store key=endRow><%/last> + <%= false|store key==endRow> + <%if loop.count|mod divisor==3 offset==1><%= true|store key==endRow><%/if> + <%last><%= true|store key==endRow><%/last> <%if endRow>
    <%include include/pagination.html pagination=albumPagination pageParameter=="page"> diff --git a/src/main/resources/templates/include/browseAlbums.html b/src/main/resources/templates/include/browseAlbums.html index cb9abba..9aacad3 100644 --- a/src/main/resources/templates/include/browseAlbums.html +++ b/src/main/resources/templates/include/browseAlbums.html @@ -1,6 +1,6 @@ <%foreach albums album> <%first>

    <%= Page.ImageBrowser.Header.Albums|l10n|html>

    <%/first> - <%if loop.count|mod divisor=3>
    <%/if> + <%if loop.count|mod divisor==3>
    <%/if>
    @@ -8,7 +8,7 @@ <%ifnull album.albumImage> <% album.title|html> <%else> - <% album.albumImage|image-link max-width=250 max-height=250 mode=enlarge title==album.title> + <% album.albumImage|image-link max-width==250 max-height==250 mode==enlarge title=album.title> <%/if>
    @@ -43,8 +43,8 @@ <%/if>
    - <%= false|store key=endRow> - <%if loop.count|mod divisor=3 offset=1><%= true|store key=endRow><%/if> - <%last><%= true|store key=endRow><%/last> + <%= false|store key==endRow> + <%if loop.count|mod divisor==3 offset==1><%= true|store key==endRow><%/if> + <%last><%= true|store key==endRow><%/last> <%if endRow>
    <%/if> <%/foreach> diff --git a/src/main/resources/templates/include/createSone.html b/src/main/resources/templates/include/createSone.html index c0df5c0..86543cc 100644 --- a/src/main/resources/templates/include/createSone.html +++ b/src/main/resources/templates/include/createSone.html @@ -1,7 +1,7 @@ <%if !identitiesWithoutSone.empty>

    <%= Page.Login.CreateSone.Title|l10n|html>

    -

    <%= View.CreateSone.Text.WotIdentityRequired|l10n|html|replace needle="{link}" replacement=''|replace needle="{/link}" replacement=''>

    +

    <%= View.CreateSone.Text.WotIdentityRequired|l10n|html|replace needle=="{link}" replacement==''|replace needle=="{/link}" replacement==''>

    @@ -23,8 +23,8 @@
    <%else> <%if !sones.empty> -

    <%= View.CreateSone.Text.NoNonSoneIdentities|l10n|html|replace needle="{link}" replacement=''|replace needle="{/link}" replacement="">

    +

    <%= View.CreateSone.Text.NoNonSoneIdentities|l10n|html|replace needle=="{link}" replacement==''|replace needle=="{/link}" replacement=="">

    <%else> -

    <%= View.CreateSone.Text.NoIdentities|l10n|html|replace needle="{link}" replacement=''|replace needle="{/link}" replacement="">

    +

    <%= View.CreateSone.Text.NoIdentities|l10n|html|replace needle=="{link}" replacement==''|replace needle=="{/link}" replacement=="">

    <%/if> <%/if> diff --git a/src/main/resources/templates/include/head.html b/src/main/resources/templates/include/head.html index 9988e68..13b564d 100644 --- a/src/main/resources/templates/include/head.html +++ b/src/main/resources/templates/include/head.html @@ -44,7 +44,7 @@ <%ifnull !currentSone> <%ifnull !currentSone.profile.avatar> - <%currentSone.profile.avatar|image-link max-width=80 max-height=80 mode=enlarge title="Profile Avatar"> + <%currentSone.profile.avatar|image-link max-width==80 max-height==80 mode==enlarge title=="Profile Avatar"> <%else> Profile Avatar <%/if> @@ -55,8 +55,7 @@
    <%ifnull ! currentSone>
    - <% currentSone|store key=sone> - <%include include/viewSone.html> + <%include include/viewSone.html sone=currentSone>
    <%/if>