aboutsummaryrefslogtreecommitdiffstats
path: root/mod/contacts.php
diff options
context:
space:
mode:
authorFriendika <info@friendika.com>2010-12-28 01:06:34 -0800
committerFriendika <info@friendika.com>2010-12-28 01:06:34 -0800
commit7b6385df946db4a61e8fc330c1a89b1415ca68ef (patch)
treef0a5f4ba4384ee274bad694112eb0140656c3f21 /mod/contacts.php
parent76d92d3f6249845f5eaba573083aba0f99755afc (diff)
downloadvolse-hubzilla-7b6385df946db4a61e8fc330c1a89b1415ca68ef.tar.gz
volse-hubzilla-7b6385df946db4a61e8fc330c1a89b1415ca68ef.tar.bz2
volse-hubzilla-7b6385df946db4a61e8fc330c1a89b1415ca68ef.zip
freeform text area for private contact info - notes or things you just want to remember (addresses, phone numbers, birthdays, whatever)
Diffstat (limited to 'mod/contacts.php')
-rw-r--r--mod/contacts.php8
1 files changed, 7 insertions, 1 deletions
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']) ? '<div id="block-message">' . t('Currently blocked') . '</div>' : ''),
'$ignored' => (($r[0]['readonly']) ? '<div id="ignore-message">' . t('Currently ignored') . '</div>' : ''),
'$rating' => contact_reputation($r[0]['rating']),