Update comment (response) links in like list
authorMatthias Schmidt <gravatronics@live.com>
Sun, 20 Aug 2017 09:59:21 +0000 (11:59 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 20 Aug 2017 09:59:21 +0000 (11:59 +0200)
See #2223

wcfsetup/install/files/lib/system/comment/manager/ArticleCommentManager.class.php
wcfsetup/install/files/lib/system/comment/manager/PageCommentManager.class.php
wcfsetup/install/files/lib/system/comment/manager/UserProfileCommentManager.class.php
wcfsetup/install/lang/de.xml
wcfsetup/install/lang/en.xml

index 9efa0cf724e84094a4f4450023c1359b2e2ac9c2..e305ae9684a00f2987538112a453b729befbf755 100644 (file)
@@ -167,6 +167,7 @@ class ArticleCommentManager extends AbstractCommentManager implements IViewableL
                                                // short output
                                                $text = WCF::getLanguage()->getDynamicVariable('wcf.like.title.com.woltlab.wcf.articleComment', [
                                                        'commentAuthor' => $comment->userID ? $users[$comment->userID] : null,
+                                                       'comment' => $comment,
                                                        'articleContent' => $articleContents[$comment->objectID],
                                                        'like' => $like
                                                ]);
@@ -191,7 +192,8 @@ class ArticleCommentManager extends AbstractCommentManager implements IViewableL
                                                        'responseAuthor' => $comment->userID ? $users[$response->userID] : null,
                                                        'commentAuthor' => $comment->userID ? $users[$comment->userID] : null,
                                                        'articleContent' => $articleContents[$comment->objectID],
-                                                       'like' => $like
+                                                       'like' => $like,
+                                                       'response' => $response
                                                ]);
                                                $like->setTitle($text);
                                                
index 5a321ea9841466a0108bc611434f21e3821052ca..0378ab83d60d00a15d26f89d3140cf917aea0fbd 100644 (file)
@@ -161,6 +161,7 @@ class PageCommentManager extends AbstractCommentManager implements IViewableLike
                                                // short output
                                                $text = WCF::getLanguage()->getDynamicVariable('wcf.like.title.com.woltlab.wcf.pageComment', [
                                                        'commentAuthor' => $comment->userID ? $users[$comment->userID] : null,
+                                                       'comment' => $comment,
                                                        'page' => $pages[$comment->objectID],
                                                        'like' => $like
                                                ]);
@@ -185,7 +186,8 @@ class PageCommentManager extends AbstractCommentManager implements IViewableLike
                                                        'responseAuthor' => $comment->userID ? $users[$response->userID] : null,
                                                        'commentAuthor' => $comment->userID ? $users[$comment->userID] : null,
                                                        'page' => $pages[$comment->objectID],
-                                                       'like' => $like
+                                                       'like' => $like,
+                                                       'response' => $response
                                                ]);
                                                $like->setTitle($text);
                                                
index 000d0b36c05ad035c8d15cb856e01307971d11cd..3338fb21fdf4a95ff4899f231573dc3d9899cb56 100644 (file)
@@ -210,7 +210,7 @@ class UserProfileCommentManager extends AbstractCommentManager implements IViewa
                                                // short output
                                                $text = WCF::getLanguage()->getDynamicVariable('wcf.like.title.com.woltlab.wcf.user.profileComment', [
                                                        'commentAuthor' => $comment->userID ? $users[$comment->userID] : null,
-                                                       'commentID' => $comment->commentID,
+                                                       'comment' => $comment,
                                                        'user' => $users[$comment->objectID],
                                                        'like' => $like
                                                ]);
@@ -234,10 +234,9 @@ class UserProfileCommentManager extends AbstractCommentManager implements IViewa
                                                $text = WCF::getLanguage()->getDynamicVariable('wcf.like.title.com.woltlab.wcf.user.profileComment.response', [
                                                        'responseAuthor' => $response->userID ? $users[$response->userID] : null,
                                                        'commentAuthor' => $comment->userID ? $users[$comment->userID] : null,
-                                                       'commentID' => $comment->commentID,
                                                        'user' => $users[$comment->objectID],
                                                        'like' => $like,
-                                                       'responseID' => $response->responseID
+                                                       'response' => $response
                                                ]);
                                                $like->setTitle($text);
                                                
index bb3eb937483a0ffc879c7ca0e8c9a9dea160ecee..894dba3a6aa17c401f98374a853397c8d394fa38 100644 (file)
@@ -2981,14 +2981,14 @@ Fehler sind beispielsweise:
                <item name="wcf.like.likes.noMoreEntries"><![CDATA[Keine weiteren Likes]]></item>
                <item name="wcf.like.dislikes.more"><![CDATA[Weitere Dislikes]]></item>
                <item name="wcf.like.dislikes.noMoreEntries"><![CDATA[Keine weiteren Dislikes]]></item>
-               <item name="wcf.like.title.com.woltlab.wcf.user.profileComment"><![CDATA[Mag den Kommentar {if $commentAuthor}<a href="{link controller='User' object=$commentAuthor}{/link}">von {$commentAuthor->username}</a>{else}eines Gasts{/if} an der <a href="{link controller='User' object=$user}#wall/comment{@$commentID}{/link}">Pinnwand von {$user->username}</a>{if $like->isDislike()} nicht{/if}.]]></item>
-               <item name="wcf.like.title.com.woltlab.wcf.user.profileComment.response"><![CDATA[Mag die Antwort {if $responseAuthor}<a href="{link controller='User' object=$responseAuthor}{/link}">von {$responseAuthor->username}</a>{else}eines Gasts{/if} zum Kommentar {if $commentAuthor}von <a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}eines Gasts{/if} an der <a href="{link controller='User' object=$user}#wall/comment{@$commentID}/response{@$responseID}{/link}">Pinnwand von {$user->username}</a>{if $like->isDislike()} nicht{/if}.]]></item>
+               <item name="wcf.like.title.com.woltlab.wcf.user.profileComment"><![CDATA[Mag den Kommentar {if $commentAuthor}<a href="{link controller='User' object=$commentAuthor}{/link}">von {$commentAuthor->username}</a>{else}eines Gasts{/if} an der <a href="{$comment->getLink()}">Pinnwand von {$user->username}</a>{if $like->isDislike()} nicht{/if}.]]></item>
+               <item name="wcf.like.title.com.woltlab.wcf.user.profileComment.response"><![CDATA[Mag die Antwort {if $responseAuthor}<a href="{link controller='User' object=$responseAuthor}{/link}">von {$responseAuthor->username}</a>{else}eines Gasts{/if} zum Kommentar {if $commentAuthor}von <a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}eines Gasts{/if} an der <a href="{$response->getLink()}">Pinnwand von {$user->username}</a>{if $like->isDislike()} nicht{/if}.]]></item>
                <item name="wcf.like.objectType.com.woltlab.wcf.likeableArticle"><![CDATA[Artikel]]></item>
                <item name="wcf.like.title.com.woltlab.wcf.likeableArticle"><![CDATA[Mag den Artikel <a href="{$article->getLink()}">{$article->getTitle()}</a>{if $like->isDislike()} nicht{/if}.]]></item>
-               <item name="wcf.like.title.com.woltlab.wcf.articleComment"><![CDATA[Mag den Kommentar {if $commentAuthor}von <a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}eines Gasts{/if} zum Artikel <a href="{$articleContent->getLink()}#comments">{$articleContent->getTitle()}</a>{if $like->isDislike()} nicht{/if}.]]></item>
-               <item name="wcf.like.title.com.woltlab.wcf.articleComment.response"><![CDATA[Mag die Antwort {if $responseAuthor}von <a href="{link controller='User' object=$responseAuthor}{/link}">{$responseAuthor->username}</a>{else}eines Gasts{/if} zum Kommentar {if $commentAuthor}von <a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}eines Gasts{/if} zum Artikel <a href="{$articleContent->getLink()}#comments">{$articleContent->getTitle()}</a>{if $like->isDislike()} nicht{/if}.]]></item>
-               <item name="wcf.like.title.com.woltlab.wcf.pageComment"><![CDATA[Mag den Kommentar {if $commentAuthor}von <a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}eines Gasts{/if} zu der Seite <a href="{$page->getLink()}#comments">{$page->getTitle()}</a>{if $like->isDislike()} nicht{/if}.]]></item>
-               <item name="wcf.like.title.com.woltlab.wcf.pageComment.response"><![CDATA[Mag die Antwort {if $responseAuthor}von <a href="{link controller='User' object=$responseAuthor}{/link}">{$responseAuthor->username}</a>{else}eines Gasts{/if} zum Kommentar {if $commentAuthor}von <a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}eines Gasts{/if} zu der Seite <a href="{$page->getLink()}#comments">{$page->getTitle()}</a>{if $like->isDislike()} nicht{/if}.]]></item>
+               <item name="wcf.like.title.com.woltlab.wcf.articleComment"><![CDATA[Mag den Kommentar {if $commentAuthor}von <a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}eines Gasts{/if} zum Artikel <a href="{$comment->getLink()}">{$articleContent->getTitle()}</a>{if $like->isDislike()} nicht{/if}.]]></item>
+               <item name="wcf.like.title.com.woltlab.wcf.articleComment.response"><![CDATA[Mag die Antwort {if $responseAuthor}von <a href="{link controller='User' object=$responseAuthor}{/link}">{$responseAuthor->username}</a>{else}eines Gasts{/if} zum Kommentar {if $commentAuthor}von <a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}eines Gasts{/if} zum Artikel <a href="{$response->getLink()}">{$articleContent->getTitle()}</a>{if $like->isDislike()} nicht{/if}.]]></item>
+               <item name="wcf.like.title.com.woltlab.wcf.pageComment"><![CDATA[Mag den Kommentar {if $commentAuthor}von <a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}eines Gasts{/if} zu der Seite <a href="{$comment->getLink()}">{$page->getTitle()}</a>{if $like->isDislike()} nicht{/if}.]]></item>
+               <item name="wcf.like.title.com.woltlab.wcf.pageComment.response"><![CDATA[Mag die Antwort {if $responseAuthor}von <a href="{link controller='User' object=$responseAuthor}{/link}">{$responseAuthor->username}</a>{else}eines Gasts{/if} zum Kommentar {if $commentAuthor}von <a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}eines Gasts{/if} zu der Seite <a href="{$response->getLink()}">{$page->getTitle()}</a>{if $like->isDislike()} nicht{/if}.]]></item>
        </category>
        
        <category name="wcf.map">
index 3e0b23ff0a0bbd790d46ed1b9fdfaf6d9fbb43ed..bdbd86b1dbae052c6b99cf727355c94fab13b9d0 100644 (file)
@@ -2927,14 +2927,14 @@ Errors are:
                <item name="wcf.like.likes.noMoreEntries"><![CDATA[There are not any new likes at the moment.]]></item>
                <item name="wcf.like.dislikes.more"><![CDATA[More Dislikes]]></item>
                <item name="wcf.like.dislikes.noMoreEntries"><![CDATA[There are not any new dislikes at the moment.]]></item>
-               <item name="wcf.like.title.com.woltlab.wcf.user.profileComment"><![CDATA[{if $like->isDislike()}Dislikes{else}Likes{/if} the comment by {if $commentAuthor}<a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}a guest{/if} on <a href="{link controller='User' object=$user}#wall/comment{@$commentID}{/link}">{$user->username}’s wall</a>.]]></item>
-               <item name="wcf.like.title.com.woltlab.wcf.user.profileComment.response"><![CDATA[{if $like->isDislike()}Dislikes{else}Likes{/if} the response by {if $responseAuthor}<a href="{link controller='User' object=$responseAuthor}{/link}">{$responseAuthor->username}</a>{else}a guest{/if} on the comment by {if $commentAuthor}<a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}a guest{/if} on <a href="{link controller='User' object=$user}#wall/comment{@$commentID}/response{@$responseID}{/link}">{$user->username}’s wall</a>.]]></item>
+               <item name="wcf.like.title.com.woltlab.wcf.user.profileComment"><![CDATA[{if $like->isDislike()}Dislikes{else}Likes{/if} the comment by {if $commentAuthor}<a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}a guest{/if} on <a href="{$comment->getLink()}">{$user->username}’s wall</a>.]]></item>
+               <item name="wcf.like.title.com.woltlab.wcf.user.profileComment.response"><![CDATA[{if $like->isDislike()}Dislikes{else}Likes{/if} the response by {if $responseAuthor}<a href="{link controller='User' object=$responseAuthor}{/link}">{$responseAuthor->username}</a>{else}a guest{/if} on the comment by {if $commentAuthor}<a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}a guest{/if} on <a href="{$response->getLink()}">{$user->username}’s wall</a>.]]></item>
                <item name="wcf.like.objectType.com.woltlab.wcf.likeableArticle"><![CDATA[Article]]></item>
                <item name="wcf.like.title.com.woltlab.wcf.likeableArticle"><![CDATA[{if $like->isDislike()}Dislikes{else}Likes{/if} the article <a href="{$article->getLink()}">{$article->getTitle()}</a>.]]></item>
-               <item name="wcf.like.title.com.woltlab.wcf.articleComment"><![CDATA[{if $like->isDislike()}Dislikes{else}Likes{/if} the comment by {if $commentAuthor}<a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}a guest{/if} on the article <a href="{$articleContent->getLink()}#comments">{$articleContent->getTitle()}</a>.]]></item>
-               <item name="wcf.like.title.com.woltlab.wcf.articleComment.response"><![CDATA[{if $like->isDislike()}Dislikes{else}Likes{/if} the response by {if $responseAuthor}<a href="{link controller='User' object=$responseAuthor}{/link}">{$responseAuthor->username}</a>{else}a guest{/if} on the comment by {if $commentAuthor}<a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}a guest{/if} on the article <a href="{$articleContent->getLink()}#comments">{$articleContent->getTitle()}</a>.]]></item>
-               <item name="wcf.like.title.com.woltlab.wcf.pageComment"><![CDATA[{if $like->isDislike()}Dislikes{else}Likes{/if} the comment by {if $commentAuthor}<a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}a guest{/if} on the page <a href="{$page->getLink()}#comments">{$page->getTitle()}</a>.]]></item>
-               <item name="wcf.like.title.com.woltlab.wcf.pageComment.response"><![CDATA[{if $like->isDislike()}Dislikes{else}Likes{/if} the response by {if $responseAuthor}<a href="{link controller='User' object=$responseAuthor}{/link}">{$responseAuthor->username}</a>{else}a guest{/if} on the comment by {if $commentAuthor}<a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}a guest{/if} on the page <a href="{$page->getLink()}#comments">{$page->getTitle()}</a>.]]></item>
+               <item name="wcf.like.title.com.woltlab.wcf.articleComment"><![CDATA[{if $like->isDislike()}Dislikes{else}Likes{/if} the comment by {if $commentAuthor}<a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}a guest{/if} on the article <a href="{$comment->getLink()}">{$articleContent->getTitle()}</a>.]]></item>
+               <item name="wcf.like.title.com.woltlab.wcf.articleComment.response"><![CDATA[{if $like->isDislike()}Dislikes{else}Likes{/if} the response by {if $responseAuthor}<a href="{link controller='User' object=$responseAuthor}{/link}">{$responseAuthor->username}</a>{else}a guest{/if} on the comment by {if $commentAuthor}<a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}a guest{/if} on the article <a href="{$response->getLink()}">{$articleContent->getTitle()}</a>.]]></item>
+               <item name="wcf.like.title.com.woltlab.wcf.pageComment"><![CDATA[{if $like->isDislike()}Dislikes{else}Likes{/if} the comment by {if $commentAuthor}<a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}a guest{/if} on the page <a href="{$comment->getLink()}">{$page->getTitle()}</a>.]]></item>
+               <item name="wcf.like.title.com.woltlab.wcf.pageComment.response"><![CDATA[{if $like->isDislike()}Dislikes{else}Likes{/if} the response by {if $responseAuthor}<a href="{link controller='User' object=$responseAuthor}{/link}">{$responseAuthor->username}</a>{else}a guest{/if} on the comment by {if $commentAuthor}<a href="{link controller='User' object=$commentAuthor}{/link}">{$commentAuthor->username}</a>{else}a guest{/if} on the page <a href="{$response->getLink()}">{$page->getTitle()}</a>.]]></item>
        </category>
        
        <category name="wcf.map">