aboutsummaryrefslogtreecommitdiffstats
path: root/mod/notifications.php
diff options
context:
space:
mode:
authorMike Macgirvin <mike@macgirvin.com>2010-10-24 20:39:24 -0700
committerMike Macgirvin <mike@macgirvin.com>2010-10-24 20:39:24 -0700
commitb41218ca303b9fd8258fd613915d3c4b9fd411c0 (patch)
treec1b08bee4f7b3737e3717d4d5eb4be9b781dc044 /mod/notifications.php
parentb8b227b32882fb511c8481a41c53637e7ce7707a (diff)
downloadvolse-hubzilla-b41218ca303b9fd8258fd613915d3c4b9fd411c0.tar.gz
volse-hubzilla-b41218ca303b9fd8258fd613915d3c4b9fd411c0.tar.bz2
volse-hubzilla-b41218ca303b9fd8258fd613915d3c4b9fd411c0.zip
workflow for federated/non-dfrn followers
Diffstat (limited to 'mod/notifications.php')
-rw-r--r--mod/notifications.php31
1 files changed, 26 insertions, 5 deletions
diff --git a/mod/notifications.php b/mod/notifications.php
index d09ec5ede..b4116bbe3 100644
--- a/mod/notifications.php
+++ b/mod/notifications.php
@@ -71,7 +71,7 @@ function notifications_content(&$a) {
'$hide_text' => ((strlen($sql_extra)) ? t('Show Ignored Requests') : t('Hide Ignored Requests'))
));
- $r = q("SELECT `intro`.`id` AS `intro-id`, `intro`.*, `contact`.*
+ $r = q("SELECT `intro`.`id` AS `intro_id`, `intro`.*, `contact`.*
FROM `intro` LEFT JOIN `contact` ON `intro`.`contact-id` = `contact`.`id`
WHERE `intro`.`uid` = %d $sql_extra AND `intro`.`blocked` = 0 ",
intval($_SESSION['uid']));
@@ -83,15 +83,36 @@ function notifications_content(&$a) {
foreach($r as $rr) {
+ $friend_selected = (($rr['network'] === 'dfrn') ? ' checked="checked" ' : ' disabled ');
+ $fan_selected = (($rr['network'] === 'stat') ? ' checked="checked" disabled ' : '');
+ $dfrn_tpl = load_view_file('view/netfriend.tpl');
+
+ $knowyou = '';
+ $dfrn_text = '';
+
+ if($rr['network'] === 'dfrn') {
+ $knowyou = t('Claims to be known to you: ') . (($rr['knowyou']) ? t('yes') : t('no'));
+
+ $dfrn_text = replace_macros($dfrn_tpl,array(
+ '$intro_id' => $rr['intro_id'],
+ '$friend_selected' => $friend_selected,
+ '$fan_selected' => $fan_selected,
+ ));
+ }
+
+
+
$o .= replace_macros($tpl,array(
- '$intro_id' => $rr['intro-id'],
- '$dfrn-id' => $rr['issued-id'],
+ '$notify_type' => (($rr['network'] === 'dfrn') ? t('Friend/Connect Request') : t('New Follower')),
+ '$dfrn_text' => $dfrn_text,
+ '$dfrn_id' => $rr['issued-id'],
'$uid' => $_SESSION['uid'],
- '$contact-id' => $rr['contact-id'],
+ '$intro_id' => $rr['intro_id'],
+ '$contact_id' => $rr['contact-id'],
'$photo' => ((x($rr,'photo')) ? $rr['photo'] : "images/default-profile.jpg"),
'$fullname' => $rr['name'],
- '$knowyou' => (($rr['knowyou']) ? t('yes') : t('no')),
'$url' => $rr['url'],
+ '$knowyou' => $knowyou,
'$note' => $rr['note']
));
}