Moved common_profile_new_message_nudge() to showstream.php

This commit is contained in:
sarven
2009-01-21 06:31:53 +00:00
parent 9376003871
commit 6c78421298
4 changed files with 35 additions and 24 deletions

View File

@@ -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;