require_once("include/NotificationsManager.php");
require_once("include/contact_selectors.php");
require_once("include/network.php");
require_once("include/NotificationsManager.php");
require_once("include/contact_selectors.php");
require_once("include/network.php");
// The check for blocked and pending is in case the friendship was already approved
// and we just want to get rid of the now pointless notification
// The check for blocked and pending is in case the friendship was already approved
// and we just want to get rid of the now pointless notification
$r = q("UPDATE `intro` SET `ignore` = 1 WHERE `id` = %d",
intval($intro_id));
goaway('notifications/intros');
$r = q("UPDATE `intro` SET `ignore` = 1 WHERE `id` = %d",
intval($intro_id));
goaway('notifications/intros');
$notifs = $nm->introNotifs($all, $startrec, $perpage);
// Get the network notifications
$notifs = $nm->introNotifs($all, $startrec, $perpage);
// Get the network notifications
$notif_header = t('Network Notifications');
$notifs = $nm->networkNotifs($show, $startrec, $perpage);
// Get the system notifications
$notif_header = t('Network Notifications');
$notifs = $nm->networkNotifs($show, $startrec, $perpage);
// Get the system notifications
$notif_header = t('System Notifications');
$notifs = $nm->systemNotifs($show, $startrec, $perpage);
// Get the personal notifications
$notif_header = t('System Notifications');
$notifs = $nm->systemNotifs($show, $startrec, $perpage);
// Get the personal notifications
$notif_header = t('Personal Notifications');
$notifs = $nm->personalNotifs($show, $startrec, $perpage);
// Get the home notifications
$notif_header = t('Personal Notifications');
$notifs = $nm->personalNotifs($show, $startrec, $perpage);
// Get the home notifications
$notif_header = t('Home Notifications');
$notifs = $nm->homeNotifs($show, $startrec, $perpage);
$notif_header = t('Home Notifications');
$notifs = $nm->homeNotifs($show, $startrec, $perpage);
json_return_and_die($notifs);
$notif_tpl = get_markup_template('notifications.tpl');
// Process the data for template creation
json_return_and_die($notifs);
$notif_tpl = get_markup_template('notifications.tpl');
// Process the data for template creation
- if ($it['network'] === NETWORK_DFRN || $it['network'] === NETWORK_DIASPORA) {
- if ($it['network'] === NETWORK_DFRN) {
+ if($it['network'] === NETWORK_DFRN || $it['network'] === NETWORK_DIASPORA) {
+ if($it['network'] === NETWORK_DFRN) {
$lbl_knowyou = t('Claims to be known to you: ');
$knowyou = (($it['knowyou']) ? t('yes') : t('no'));
$helptext = t('Shall your connection be bidirectional or not?');
$lbl_knowyou = t('Claims to be known to you: ');
$knowyou = (($it['knowyou']) ? t('yes') : t('no'));
$helptext = t('Shall your connection be bidirectional or not?');
$notif_content[] = replace_macros($tpl, array(
'$header' => htmlentities($header),
'$str_notifytype' => t('Notification type: '),
$notif_content[] = replace_macros($tpl, array(
'$header' => htmlentities($header),
'$str_notifytype' => t('Notification type: '),
'$approve' => t('Approve'),
'$note' => $it['note'],
'$ignore' => t('Ignore'),
'$approve' => t('Approve'),
'$note' => $it['note'],
'$ignore' => t('Ignore'),
'$item_link' => $it['link'],
'$item_image' => $it['image'],
'$item_url' => $it['url'],
'$item_link' => $it['link'],
'$item_image' => $it['image'],
'$item_url' => $it['url'],
'$item_when' => $it['when'],
'$item_ago' => $it['ago'],
'$item_seen' => $it['seen'],
'$item_when' => $it['when'],
'$item_ago' => $it['ago'],
'$item_seen' => $it['seen'],
// It doesn't make sense to show the Show unread / Show all link visible if the user is on the
// "Show all" page and there are no notifications. So we will hide it.
// It doesn't make sense to show the Show unread / Show all link visible if the user is on the
// "Show all" page and there are no notifications. So we will hide it.
$notif_show_lnk = array(
'href' => ($show ? 'notifications/'.$notifs['ident'] : 'notifications/'.$notifs['ident'].'?show=all' ),
'text' => ($show ? t('Show unread') : t('Show all')),
$notif_show_lnk = array(
'href' => ($show ? 'notifications/'.$notifs['ident'] : 'notifications/'.$notifs['ident'].'?show=all' ),
'text' => ($show ? t('Show unread') : t('Show all')),