diff options
author | Mike Macgirvin <mike@macgirvin.com> | 2010-10-01 02:28:06 -0700 |
---|---|---|
committer | Mike Macgirvin <mike@macgirvin.com> | 2010-10-01 02:28:06 -0700 |
commit | f5615068ca338153ab7dacf5c9ce46c6ed7b1ab4 (patch) | |
tree | 3a115617468d12b11877d38ce3f3c415c59981d7 /mod/contacts.php | |
parent | 2ae38e3fbffe2f51fc1dc56e398625e3cebb667c (diff) | |
download | volse-hubzilla-f5615068ca338153ab7dacf5c9ce46c6ed7b1ab4.tar.gz volse-hubzilla-f5615068ca338153ab7dacf5c9ce46c6ed7b1ab4.tar.bz2 volse-hubzilla-f5615068ca338153ab7dacf5c9ce46c6ed7b1ab4.zip |
trialing pubsubhubbub - operational tweaks
Diffstat (limited to 'mod/contacts.php')
-rw-r--r-- | mod/contacts.php | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/mod/contacts.php b/mod/contacts.php index 438b37aaf..8c2446979 100644 --- a/mod/contacts.php +++ b/mod/contacts.php @@ -41,7 +41,15 @@ function contacts_post(&$a) { return; } } + + $usehub = ((intval($_POST['usehub'])) ? 1 : 0); + if($orig_record[0]['usehub'] && (! $usehub)) { + // remove hub subscription + } + $priority = intval($_POST['priority']); + if($priority == (-1)) + if($priority > 5 || $priority < 0) $priority = 0; @@ -51,9 +59,10 @@ function contacts_post(&$a) { $reason = notags(trim($_POST['reason'])); - $r = q("UPDATE `contact` SET `profile-id` = %d, `priority` = %d , `rating` = %d, `reason` = '%s' + $r = q("UPDATE `contact` SET `profile-id` = %d, `usehub` = %d, `priority` = %d , `rating` = %d, `reason` = '%s' WHERE `id` = %d AND `uid` = %d LIMIT 1", intval($profile_id), + intval($usehub), intval($priority), intval($rating), dbesc($reason), @@ -176,8 +185,19 @@ function contacts_content(&$a) { $url = $r[0]['url']; $sparkle = ''; } + + $huburl = get_config('system','huburl'); + if($huburl) { + // finish selector + $hubenable = ''; + } + else + $hubenable = ''; + + $o .= replace_macros($tpl,array( '$poll_interval' => contact_poll_interval($r[0]['priority']), + '$hubenable' => $hubenable, '$last_update' => (($r[0]['last-update'] == '0000-00-00 00:00:00') ? t('Never') : datetime_convert('UTC',date_default_timezone_get(),$r[0]['last-update'],'D, j M Y, g:i A')), |