summaryrefslogtreecommitdiff
path: root/controllers
diff options
context:
space:
mode:
authorAaron Parecki <aaron@parecki.com>2015-04-07 09:18:12 -0700
committerAaron Parecki <aaron@parecki.com>2015-04-07 09:18:12 -0700
commitf9a19f628fd805c0e756c133bd789a9da8fcd246 (patch)
treea2d5f4af12ae98999451881e0cc97dcd3dee0bea /controllers
parent1c4bf54da4ca2419598a8cb541b3cb3737452aab (diff)
parentf0d8b180519bce1f0e8498a98f6970723ca88231 (diff)
Merge pull request #5 from kylewm/master
add reply={url} query param for posting a note
Diffstat (limited to 'controllers')
-rw-r--r--controllers/controllers.php6
1 files changed, 6 insertions, 0 deletions
diff --git a/controllers/controllers.php b/controllers/controllers.php
index 0fef6df..3f09aac 100644
--- a/controllers/controllers.php
+++ b/controllers/controllers.php
@@ -43,9 +43,14 @@ function generate_login_token() {
$app->get('/new', function() use($app) {
if($user=require_login($app)) {
+ $params = $app->request()->params();
$entry = false;
$photo_url = false;
+ $in_reply_to = '';
+
+ if(array_key_exists('reply', $params))
+ $in_reply_to = $params['reply'];
$test_response = '';
if($user->last_micropub_response) {
@@ -60,6 +65,7 @@ $app->get('/new', function() use($app) {
$html = render('new-post', array(
'title' => 'New Post',
+ 'in_reply_to' => $in_reply_to,
'micropub_endpoint' => $user->micropub_endpoint,
'micropub_scope' => $user->micropub_scope,
'micropub_access_token' => $user->micropub_access_token,