summaryrefslogtreecommitdiff
path: root/lib/util.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/util.php')
-rw-r--r--lib/util.php17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/util.php b/lib/util.php
index 4fb58e7dc..df736cf01 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -2183,3 +2183,20 @@ function common_compatible_license($from, $to) {
# XXX: better compatibility check needed here!
return ($from == $to);
}
+
+function common_block_form($profile) {
+ common_element_start('form', array('id' => 'block-' . $profile->id,
+ 'method' => 'post',
+ 'class' => 'block',
+ 'action' => common_local_url('block')));
+ common_hidden('token', common_session_token());
+ common_element('input', array('id' => 'blockto-' . $profile->id,
+ 'name' => 'blockto',
+ 'type' => 'hidden',
+ 'value' => $profile->id));
+ common_element('input', array('type' => 'submit',
+ 'class' => 'submit',
+ 'value' => _('Block')));
+ common_element_end('form');
+ return;
+}