$request_id = (($a->argc > 1) ? $a->argv[1] : 0);
- if ($request_id === "all")
+ if($request_id === "all")
return;
- if ($request_id) {
+ if($request_id) {
$r = q("SELECT * FROM `intro` WHERE `id` = %d AND `uid` = %d LIMIT 1",
intval($request_id),
$fid = $r[0]['fid'];
- if ($_POST['submit'] == t('Discard')) {
+ if($_POST['submit'] == t('Discard')) {
$r = q("DELETE FROM `intro` WHERE `id` = %d",
intval($intro_id)
);
- if (! $fid) {
+ if(! $fid) {
// 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
}
goaway('notifications/intros');
}
- if ($_POST['submit'] == t('Ignore')) {
+ if($_POST['submit'] == t('Ignore')) {
$r = q("UPDATE `intro` SET `ignore` = 1 WHERE `id` = %d",
intval($intro_id));
goaway('notifications/intros');
$startrec = ($page * $perpage) - $perpage;
// Get introductions
- if ( (($a->argc > 1) && ($a->argv[1] == 'intros')) || (($a->argc == 1))) {
+ if( (($a->argc > 1) && ($a->argv[1] == 'intros')) || (($a->argc == 1))) {
nav_set_selected('introductions');
$notif_header = t('Notifications');
$notifs = $nm->introNotifs($all, $startrec, $perpage);
// Get the network notifications
- } elseif (($a->argc > 1) && ($a->argv[1] == 'network')) {
+ } else if (($a->argc > 1) && ($a->argv[1] == 'network')) {
$notif_header = t('Network Notifications');
$notifs = $nm->networkNotifs($show, $startrec, $perpage);
// Get the system notifications
- } elseif (($a->argc > 1) && ($a->argv[1] == 'system')) {
+ } else if (($a->argc > 1) && ($a->argv[1] == 'system')) {
$notif_header = t('System Notifications');
$notifs = $nm->systemNotifs($show, $startrec, $perpage);
// Get the personal notifications
- } elseif (($a->argc > 1) && ($a->argv[1] == 'personal')) {
+ } else if (($a->argc > 1) && ($a->argv[1] == 'personal')) {
$notif_header = t('Personal Notifications');
$notifs = $nm->personalNotifs($show, $startrec, $perpage);
// Get the home notifications
- } elseif (($a->argc > 1) && ($a->argv[1] == 'home')) {
+ } else if (($a->argc > 1) && ($a->argv[1] == 'home')) {
$notif_header = t('Home Notifications');
$notifs = $nm->homeNotifs($show, $startrec, $perpage);
$notifs['page'] = $a->pager['page'];
// Json output
- if (intval($json) === 1)
+ if(intval($json) === 1)
json_return_and_die($notifs);
$notif_tpl = get_markup_template('notifications.tpl');
// Process the data for template creation
- if ($notifs['ident'] === 'introductions') {
+ if($notifs['ident'] === 'introductions') {
$sugg = get_markup_template('suggestions.tpl');
$tpl = get_markup_template("intros.tpl");
$knowyou = '';
$dfrn_text = '';
- 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?');
}
}
- if ($notifs['total'] == 0)
+ if($notifs['total'] == 0)
info( t('No introductions.') . EOL);
// Normal notifications (no introductions)
// 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.
- if ($show == 0 || intval($show) && $notifs['total'] > 0) {
+ if($show == 0 || intval($show) && $notifs['total'] > 0) {
$notif_show_lnk = array(
'href' => ($show ? 'notifications/'.$notifs['ident'] : 'notifications/'.$notifs['ident'].'?show=all' ),
'text' => ($show ? t('Show unread') : t('Show all')),
}
// Output if there aren't any notifications available
- if ($notifs['total'] == 0) {
+ if($notifs['total'] == 0)
$notif_nocontent = sprintf( t('No more %s notifications.'), $notifs['ident']);
- }
}
$o .= replace_macros($notif_tpl, array(