From 17fd7b185054e260f0a9a2cedd264ff3ef43d725 Mon Sep 17 00:00:00 2001 From: Evan Prodromou Date: Mon, 8 Dec 2008 12:09:31 -0500 Subject: add returnto information to the block form darcs-hash:20081208170931-5ed1f-e7c5853e6a222b04723f20c01ebaae15eeab3687.gz --- lib/util.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/util.php b/lib/util.php index fa8248dba..4d670edcc 100644 --- a/lib/util.php +++ b/lib/util.php @@ -2185,7 +2185,7 @@ function common_compatible_license($from, $to) { return ($from == $to); } -function common_block_form($profile) { +function common_block_form($profile, $args=NULL) { common_element_start('form', array('id' => 'block-' . $profile->id, 'method' => 'post', 'class' => 'block', @@ -2199,6 +2199,11 @@ function common_block_form($profile) { 'class' => 'submit', 'name' => 'block', 'value' => _('Block'))); + if ($args) { + foreach ($args as $k => $v) { + common_hidden('returnto-' . $k, $v); + } + } common_element_end('form'); return; } -- cgit v1.2.3-54-g00ecf