From 50c7e4c722a39582c185eafe452f0b321dd39e7e Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Thu, 19 Jun 2008 12:18:14 -0400 Subject: posting from a form takes you back to the same page darcs-hash:20080619161814-5ed1f-5add55346470e71a53a676d39617062acc0f19bf.gz --- lib/util.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/util.php b/lib/util.php index a4c30cbe4..88ddbcc00 100644 --- a/lib/util.php +++ b/lib/util.php @@ -650,7 +650,7 @@ function common_profile_url($nickname) { # Don't call if nobody's logged in -function common_notice_form() { +function common_notice_form($action=NULL) { $user = common_current_user(); assert(!is_null($user)); common_element_start('form', array('id' => 'status_form', @@ -663,6 +663,9 @@ function common_notice_form() { common_element('textarea', array('id' => 'status_textarea', 'name' => 'status_textarea'), ' '); + if ($action) { + common_hidden('returnto', $action); + } common_element('input', array('id' => 'status_submit', 'name' => 'status_submit', 'type' => 'submit', -- cgit v1.2.3-54-g00ecf