summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorsarven <csarven@plantard.controlezvous.ca>2009-01-21 06:31:53 +0000
committersarven <csarven@plantard.controlezvous.ca>2009-01-21 06:31:53 +0000
commit6c7842129841878b65c1d686de64f98f1edcb16f (patch)
tree613e976c0f2841cb23c36648bc740308f0b3973f /lib
parent9376003871652300b5960437fd37461fdd85e63b (diff)
Moved common_profile_new_message_nudge() to showstream.php
Diffstat (limited to 'lib')
-rw-r--r--lib/nudgeform.php17
-rw-r--r--lib/util.php19
2 files changed, 15 insertions, 21 deletions
diff --git a/lib/nudgeform.php b/lib/nudgeform.php
index 7d04e11e4..6374a7698 100644
--- a/lib/nudgeform.php
+++ b/lib/nudgeform.php
@@ -77,9 +77,22 @@ class NudgeForm extends Form
function id()
{
- return 'nudge';
+ return 'form_user_nudge';
}
+
+ /**
+ * class of the form
+ *
+ * @return string of the form class
+ */
+
+ function formClass()
+ {
+ return 'form_user_nudge';
+ }
+
+
/**
* Action of the form
*
@@ -102,4 +115,4 @@ class NudgeForm extends Form
{
$this->out->submit('submit', _('Send a nudge'));
}
-} \ No newline at end of file
+}
diff --git a/lib/util.php b/lib/util.php
index 73c4cdcc8..ed7284183 100644
--- a/lib/util.php
+++ b/lib/util.php
@@ -1645,25 +1645,6 @@ function common_nudge_response()
common_element('p', array('id' => 'nudge_response'), _('Nudge sent!'));
}
-// XXX: Refactor this code
-function common_profile_new_message_nudge ($cur, $profile)
-{
- $user = User::staticGet('id', $profile->id);
-
- if ($cur && $cur->id != $user->id && $cur->mutuallySubscribed($user)) {
- common_element_start('li', array('id' => 'profile_send_a_new_message'));
- common_element('a', array('href' => common_local_url('newmessage', array('to' => $user->id))),
- _('Send a message'));
- common_element_end('li');
-
- if ($user->email && $user->emailnotifynudge) {
- common_element_start('li', array('id' => 'profile_nudge'));
- common_nudge_form($user);
- common_element_end('li');
- }
- }
-}
-
function common_cache_key($extra)
{
return 'laconica:' . common_keyize(common_config('site', 'name')) . ':' . $extra;