diff options
author | Aaron Parecki <aaron@parecki.com> | 2015-04-18 17:45:19 -0700 |
---|---|---|
committer | Aaron Parecki <aaron@parecki.com> | 2015-04-18 17:45:19 -0700 |
commit | e456edd83b88d83a4b2ae274fa91f517bba8cf6a (patch) | |
tree | 38b40170043ace4dace181022df56abe7a9e6b83 | |
parent | ecd4b8de9393a4cf1a9469075e9479214a4148ca (diff) | |
parent | f9a19f628fd805c0e756c133bd789a9da8fcd246 (diff) |
Merge branch 'master' of github.com:aaronpk/IndiePost
-rw-r--r-- | controllers/controllers.php | 6 | ||||
-rw-r--r-- | views/new-post.php | 2 |
2 files changed, 7 insertions, 1 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, diff --git a/views/new-post.php b/views/new-post.php index a03259c..86d15c9 100644 --- a/views/new-post.php +++ b/views/new-post.php @@ -10,7 +10,7 @@ <div class="form-group"> <label for="note_in_reply_to"><code>in-reply-to</code> (optional, a URL you are replying to)</label> - <input type="text" id="note_in_reply_to" value="" class="form-control"> + <input type="text" id="note_in_reply_to" value="<?= $this->in_reply_to ?>" class="form-control"> </div> <div class="form-group"> |