Skip to content

Commit

Permalink
Fix warning when previewing comments (fixes #786)
Browse files Browse the repository at this point in the history
  • Loading branch information
onli committed Nov 3, 2022
1 parent 7675b08 commit 70a5fa8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
3 changes: 3 additions & 0 deletions docs/NEWS
@@ -1,6 +1,9 @@
Version 2.4-beta2 ()
------------------------------------------------------------------------

* Fix: Previewing comments warning threw a warning on PHP 8, when
debug mode on (thanks @hannob)

* Fix: Editor autosave cached was not deleted when saving entry

* Fix: Editor autosave was not on by default, despite the setting
Expand Down
10 changes: 5 additions & 5 deletions templates/2k11/comments.tpl
@@ -1,5 +1,5 @@
{foreach from=$comments item=comment name="comments"}
<article id="c{$comment.id}" class="serendipity_comment{if isset($entry.author) && $entry.author == $comment.author} serendipity_comment_author_self{/if} {cycle values="odd,even"} {if $comment.depth > 8}commentlevel-9{else}commentlevel-{$comment.depth}{/if}">
<article id="c{if isset($comment.id)}{$comment.id}{/if}" class="serendipity_comment{if isset($entry.author) && $entry.author == $comment.author} serendipity_comment_author_self{/if} {cycle values="odd,even"} {if $comment.depth > 8}commentlevel-9{else}commentlevel-{$comment.depth}{/if}">
<header class="clearfix">
<h4{if 'spice_twitter_name'|array_key_exists:$comment and $comment.spice_twitter_name && $comment.spice_twitter_followme} class="short-heading"{/if}>{if $comment.url}<a href="{$comment.url}">{/if}{$comment.author|default:$CONST.ANONYMOUS}{if $comment.url}</a>{/if}{if 'spice_twitter_name'|array_key_exists:$comment and $comment.spice_twitter_name and not $comment.spice_twitter_followme} (<a href="{$comment.spice_twitter_url}"{if $comment.spice_twitter_nofollow} rel="nofollow"{/if}>@{$comment.spice_twitter_name}</a>){/if} {$CONST.ON} <time datetime="{$comment.timestamp|@serendipity_html5time}">{$comment.timestamp|@formatTime:$template_option.date_format}</time>:</h4>
{if 'spice_twitter_name'|array_key_exists:$comment and $comment.spice_twitter_name && $comment.spice_twitter_followme}
Expand All @@ -20,17 +20,17 @@

<footer>
<time>{$comment.timestamp|@formatTime:'%H:%M'}</time>
| <a class="comment_source_trace" href="#c{$comment.id}" title="{$CONST.TWOK11_PLINK_TITLE}">{$CONST.TWOK11_PLINK_TEXT}</a>
| <a class="comment_source_trace" href="#c{if isset($comment.id)}{$comment.id}{/if}" title="{$CONST.TWOK11_PLINK_TITLE}">{$CONST.TWOK11_PLINK_TEXT}</a>
{if isset($entry) and 'is_entry_owner'|array_key_exists:$entry and $entry.is_entry_owner}
| <a class="comment_source_ownerlink" href="{$comment.link_delete}" title="{$CONST.COMMENT_DELETE_CONFIRM|@sprintf:$comment.id:$comment.author}">{$CONST.DELETE}</a>
| <a class="comment_source_ownerlink" href="{$comment.link_delete}" title="{if isset($comment.id)}{$CONST.COMMENT_DELETE_CONFIRM|@sprintf:$comment.id:$comment.author}{/if}">{$CONST.DELETE}</a>
{/if}
{if isset($template_option.refcomments) and $template_option.refcomments == true}
{if $comment.parent_id != '0'}
| <a class="reply_origin" href="#c{$comment.parent_id}" title="{$CONST.TWOK11_REPLYORIGIN}: {$CONST.COMMENT} #c{$comment.parent_id}">{$CONST.TWOK11_REPLYORIGIN}</a>
{/if}
{/if}
| <a class="comment_reply" href="#serendipity_CommentForm" id="serendipity_reply_{$comment.id}"{if isset($comment_onchange) and $comment_onchange != ''} onclick="{$comment_onchange}"{/if}>{$CONST.REPLY}</a>
<div id="serendipity_replyform_{$comment.id}"></div>
| <a class="comment_reply" href="#serendipity_CommentForm" id="serendipity_reply_{if isset($comment.id)}{$comment.id}{/if}"{if isset($comment_onchange) and $comment_onchange != ''} onclick="{$comment_onchange}"{/if}>{$CONST.REPLY}</a>
<div id="serendipity_replyform_{if isset($comment.id)}{$comment.id}{/if}"></div>
</footer>
</article>
{foreachelse}
Expand Down

0 comments on commit 70a5fa8

Please sign in to comment.