From 7b6385df946db4a61e8fc330c1a89b1415ca68ef Mon Sep 17 00:00:00 2001 From: Friendika Date: Tue, 28 Dec 2010 01:06:34 -0800 Subject: freeform text area for private contact info - notes or things you just want to remember (addresses, phone numbers, birthdays, whatever) --- mod/contacts.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mod/contacts.php') diff --git a/mod/contacts.php b/mod/contacts.php index 29ef8a8cd..33d1955a5 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -65,12 +65,15 @@ function contacts_post(&$a) { $reason = notags(trim($_POST['reason'])); - $r = q("UPDATE `contact` SET `profile-id` = %d, `priority` = %d , `rating` = %d, `reason` = '%s' + $info = escape_tags(trim($_POST['info'])); + + $r = q("UPDATE `contact` SET `profile-id` = %d, `priority` = %d , `rating` = %d, `reason` = '%s', `info` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($profile_id), intval($priority), intval($rating), dbesc($reason), + dbesc($info), intval($contact_id), intval(local_user()) ); @@ -190,6 +193,8 @@ function contacts_content(&$a) { return; } + $tpl = load_view_file('view/contact_head.tpl'); + $a->page['htmlhead'] .= replace_macros($tpl, array('$baseurl' => $a->get_baseurl())); require_once('include/contact_selectors.php'); @@ -239,6 +244,7 @@ function contacts_content(&$a) { '$block_text' => (($r[0]['blocked']) ? t('Unblock this contact') : t('Block this contact') ), '$ignore_text' => (($r[0]['readonly']) ? t('Unignore this contact') : t('Ignore this contact') ), '$insecure' => (($r[0]['network'] === 'dfrn') ? '' : load_view_file('view/insecure_net.tpl')), + '$info' => $r[0]['info'], '$blocked' => (($r[0]['blocked']) ? '
' . t('Currently blocked') . '
' : ''), '$ignored' => (($r[0]['readonly']) ? '
' . t('Currently ignored') . '
' : ''), '$rating' => contact_reputation($r[0]['rating']), -- cgit v1.2.3