correct reply url in comment display
[anoweco.git] / www / comment.php
index 43dbd2eb76495eea0f7eb4147f46d145da8f5d8c..df39c3c5109354596bc1901b6526d58d6fa8f8fc 100644 (file)
@@ -38,8 +38,9 @@ $vars = array(
         'url'  => Urls::full(Urls::user($rowUser->user_id)),
         'imageurl' => Urls::userImg($rowUser),
     ),
-    'replyUrl' => Urls::full(
-        '/reply.php?url=' . urlencode(Urls::full($rowComment->comment_id))
+    'postUrl' => Urls::full(Urls::comment($rowComment->comment_id)),
+    'replyUrl' => Urls::reply(
+        Urls::full(Urls::comment($rowComment->comment_id))
     ),
 );
 
@@ -56,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);
 ?>