]> git.mxchange.org Git - friendica.git/blobdiff - mod/notifications.php
More usage of dbm::is_result($r) instead of count($r):
[friendica.git] / mod / notifications.php
index 01dce2f447df1b9ce2fb6e2bbc641c106a4a2dcb..9760b34707609a2d4b3a37acc4f2d87db877f832 100644 (file)
@@ -27,7 +27,7 @@ function notifications_post(&$a) {
                        intval(local_user())
                );
 
-               if(count($r)) {
+               if(dbm::is_result($r)) {
                        $intro_id = $r[0]['id'];
                        $contact_id = $r[0]['contact-id'];
                }
@@ -148,8 +148,8 @@ function notifications_content(&$a) {
 
                // The link to switch between ignored and normal connection requests
                $notif_show_lnk = array(
-                       'href' => ($all === false ? 'notifications/intros/all' : 'notifications/intros' ),
-                       'text' => ($all === false ? t('Show Ignored Requests') : t('Hide Ignored Requests'))
+                       'href' => (!$all ? 'notifications/intros/all' : 'notifications/intros' ),
+                       'text' => (!$all ? t('Show Ignored Requests') : t('Hide Ignored Requests'))
                );
 
                // Loop through all introduction notifications.This creates an array with the output html for each
@@ -285,7 +285,7 @@ function notifications_content(&$a) {
                                '$item_label' => $it['label'],
                                '$item_link' => $it['link'],
                                '$item_image' => $it['image'],
-                               '$item_text' => $it['text'],
+                               '$item_text' => htmlentities($it['text']),
                                '$item_when' => $it['when'],
                                '$item_seen' => $it['seen'],
                        ));