* @file mod/notifications.php
* @brief The notifications module
*/
+
use Friendica\App;
use Friendica\Content\ContactSelector;
use Friendica\Content\Nav;
use Friendica\Core\L10n;
use Friendica\Core\NotificationsManager;
use Friendica\Core\System;
+use Friendica\Database\DBA;
use Friendica\Database\DBM;
function notifications_post(App $a)
}
if ($request_id) {
- $intro = dba::selectFirst('intro', ['id', 'contact-id', 'fid'], ['id' => $request_id, 'uid' => local_user()]);
+ $intro = DBA::selectFirst('intro', ['id', 'contact-id', 'fid'], ['id' => $request_id, 'uid' => local_user()]);
if (DBM::is_result($intro)) {
$intro_id = $intro['id'];
$fid = $intro['fid'];
if ($_POST['submit'] == L10n::t('Discard')) {
- dba::delete('intro', ['id' => $intro_id]);
+ DBA::delete('intro', ['id' => $intro_id]);
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
$condition = ['id' => $contact_id, 'uid' => local_user(),
'self' => false, 'blocked' => true, 'pending' => true];
- dba::delete('contact', $condition);
+ DBA::delete('contact', $condition);
}
goaway('notifications/intros');
}
if ($_POST['submit'] == L10n::t('Ignore')) {
- dba::update('intro', ['ignore' => true], ['id' => $intro_id]);
+ DBA::update('intro', ['ignore' => true], ['id' => $intro_id]);
goaway('notifications/intros');
}
}
// Get the nav tabs for the notification pages
$tabs = $nm->getTabs();
$notif_content = [];
+ $notif_nocontent = '';
// Notification results per page
$perpage = 20;
switch ($it['label']) {
case 'friend_suggestion':
$notif_content[] = replace_macros($sugg, [
- '$str_notifytype' => L10n::t('Notification type: '),
+ '$type' => $it['label'],
+ '$str_notifytype' => L10n::t('Notification type:'),
'$notify_type' => $it['notify_type'],
'$intro_id' => $it['intro_id'],
- '$madeby' => L10n::t('suggested by %s', $it['madeby']),
- '$contact_id' => $it['contact-id'],
+ '$lbl_madeby' => L10n::t('Suggested by:'),
+ '$madeby' => $it['madeby'],
+ '$madeby_url' => $it['madeby_url'],
+ '$madeby_zrl' => $it['madeby_zrl'],
+ '$madeby_addr' => $it['madeby_addr'],
+ '$contact_id' => $it['contact_id'],
'$photo' => $it['photo'],
'$fullname' => $it['name'],
'$url' => $it['url'],
+ '$zrl' => $it['zrl'],
+ '$lbl_url' => L10n::t('Profile URL'),
+ '$addr' => $it['addr'],
'$hidden' => ['hidden', L10n::t('Hide this contact from others'), ($it['hidden'] == 1), ''],
'$knowyou' => $it['knowyou'],
$dfrn_tpl = get_markup_template('netfriend.tpl');
$knowyou = '';
+ $lbl_knowyou = '';
$dfrn_text = '';
+ $helptext = '';
+ $helptext2 = '';
+ $helptext3 = '';
if ($it['network'] === NETWORK_DFRN || $it['network'] === NETWORK_DIASPORA) {
if ($it['network'] === NETWORK_DFRN) {
}
$notif_content[] = replace_macros($tpl, [
+ '$type' => $it['label'],
'$header' => htmlentities($header),
- '$str_notifytype' => L10n::t('Notification type: '),
+ '$str_notifytype' => L10n::t('Notification type:'),
'$notify_type' => $it['notify_type'],
'$dfrn_text' => $dfrn_text,
'$dfrn_id' => $it['dfrn_id'],