]> git.mxchange.org Git - friendica.git/blobdiff - mod/notifications.php
Fixes:
[friendica.git] / mod / notifications.php
index 7b63a8dd02c57d5e7e5931f7d130affb267db819..b639b089f84fa73e8896d828e6f77c9b47fcae53 100644 (file)
@@ -3,12 +3,14 @@
  * @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)
@@ -24,7 +26,7 @@ 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'];
@@ -40,20 +42,20 @@ function notifications_post(App $a)
                $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');
                }
        }
@@ -79,6 +81,7 @@ function notifications_content(App $a)
        // Get the nav tabs for the notification pages
        $tabs = $nm->getTabs();
        $notif_content = [];
+       $notif_nocontent = '';
 
        // Notification results per page
        $perpage = 20;
@@ -184,7 +187,11 @@ function notifications_content(App $a)
                                        $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) {