Remove user profile link for deleted last conversation poster
authorMatthias Schmidt <gravatronics@live.com>
Sun, 27 Mar 2016 15:36:27 +0000 (17:36 +0200)
committerMatthias Schmidt <gravatronics@live.com>
Sun, 27 Mar 2016 15:36:27 +0000 (17:36 +0200)
templates/conversationList.tpl

index 225cd4d51dc212d03a7cb11dbdebefd8d0b561fb..4df3ecd1fd9b6d15e4c4f0f31938ba9f74651752 100644 (file)
                                                                        
                                                                        <div>
                                                                                <p>
-                                                                                       <a href="{link controller='User' object=$conversation->getLastPosterProfile()->getDecoratedObject()}{/link}" class="userLink" data-user-id="{@$conversation->getLastPosterProfile()->userID}">{$conversation->lastPoster}</a>
+                                                                                       {if $conversation->lastPosterID}
+                                                                                               <a href="{link controller='User' object=$conversation->getLastPosterProfile()->getDecoratedObject()}{/link}" class="userLink" data-user-id="{@$conversation->getLastPosterProfile()->userID}">{$conversation->lastPoster}</a>
+                                                                                       {else}
+                                                                                               {$conversation->lastPoster}
+                                                                                       {/if}
                                                                                </p>
                                                                                <small>{@$conversation->lastPostTime|time}</small>
                                                                        </div>