correct reply url in comment display
[anoweco.git] / www / comment.php
index beaad9646510f850394067e7d1e54ab1ab2a4e8e..df39c3c5109354596bc1901b6526d58d6fa8f8fc 100644 (file)
@@ -39,9 +39,8 @@ $vars = array(
         'imageurl' => Urls::userImg($rowUser),
     ),
     'postUrl' => Urls::full(Urls::comment($rowComment->comment_id)),
-    'replyUrl' => Urls::full(
-        '/reply.php?url='
-        . urlencode(Urls::full(Urls::comment($rowComment->comment_id)))
+    'replyUrl' => Urls::reply(
+        Urls::full(Urls::comment($rowComment->comment_id))
     ),
 );
 
@@ -58,5 +57,10 @@ if ($rowComment->comment_type == 'like') {
     $vars['htmlContent'] = $htmlContent;
 }
 
+if (isset($linkbackEndpoint) && $linkbackEndpoint) {
+    header('X-Pingback: ' . $linkbackEndpoint);
+    header('Link: <' . $linkbackEndpoint . '>; rel="webmention"');
+}
+
 render($template, $vars);
 ?>