correct reply url in comment display
authorChristian Weiske <cweiske@cweiske.de>
Mon, 26 Feb 2018 21:47:44 +0000 (22:47 +0100)
committerChristian Weiske <cweiske@cweiske.de>
Mon, 26 Feb 2018 21:47:44 +0000 (22:47 +0100)
src/anoweco/Urls.php
www/comment.php

index 5096d31..3f0f6ca 100644 (file)
@@ -44,5 +44,17 @@ class Urls
         }
         return intval($userId);
     }
+
+    public static function reply($url)
+    {
+        return 'https://quill.p3k.io/'
+            . '?' . http_build_query(
+                [
+                    'dontask' => 1,
+                    'me'      => Urls::full('/'),
+                    'reply'   => $url,
+                ]
+            );
+    }
 }
 ?>
index e384361..df39c3c 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))
     ),
 );