]> git.mxchange.org Git - friendica.git/commitdiff
Once again, notices ... (#5535)
authorMichael Vogel <icarus@dabo.de>
Tue, 31 Jul 2018 16:39:23 +0000 (18:39 +0200)
committerTobias Diekershoff <tobias.diekershoff@gmx.net>
Tue, 31 Jul 2018 16:39:23 +0000 (18:39 +0200)
include/enotify.php
src/Model/Event.php
src/Model/GContact.php
src/Protocol/DFRN.php
src/Protocol/Diaspora.php
src/Protocol/OStatus.php

index 39c739a2bb591732fabf63e287bc73f1ed2309bf..35f984b0ecf6bed23d8dd7c233f8b201ed3665fa 100644 (file)
@@ -95,6 +95,7 @@ function notification($params)
 
        if ($params['type'] == NOTIFY_MAIL) {
                $itemlink = $siteurl.'/message/'.$params['item']['id'];
+               $params["link"] = $itemlink;
 
                $subject = L10n::t('[Friendica:Notify] New mail received at %s', $sitename);
 
index 8e67da6352daf5f7b269b750056b9e132c5f3f8b..c705a6ca7d928d593a82ac5cbd4de9a37ae2cfe8 100644 (file)
@@ -48,9 +48,13 @@ class Event extends BaseObject
                }
 
                if ($simple) {
-                       $o = "<h3>" . BBCode::convert($event['summary'], false, $simple) . "</h3>";
+                       if (!empty($event['summary'])) {
+                               $o = "<h3>" . BBCode::convert($event['summary'], false, $simple) . "</h3>";
+                       }
 
-                       $o .= "<div>" . BBCode::convert($event['desc'], false, $simple) . "</div>";
+                       if (!empty($event['desc'])) {
+                               $o .= "<div>" . BBCode::convert($event['desc'], false, $simple) . "</div>";
+                       }
 
                        $o .= "<h4>" . L10n::t('Starts:') . "</h4><p>" . $event_start . "</p>";
 
index 9941eb1ed711156ef04a94008283e467a9297236..13aa09333696a31fd63034b6550dc408067fdf5a 100644 (file)
@@ -705,6 +705,10 @@ class GContact
                                $doprobing = (((time() - $last_contact) > (90 * 86400)) && ((time() - $last_failure) > (90 * 86400)));
                        }
                } else {
+                       $contact['location'] = defaults($contact, 'location', '');
+                       $contact['about'] = defaults($contact, 'about', '');
+                       $contact['generation'] = defaults($contact, 'generation', 0);
+
                        q(
                                "INSERT INTO `gcontact` (`name`, `nick`, `addr` , `network`, `url`, `nurl`, `photo`, `created`, `updated`, `location`, `about`, `hide`, `generation`)
                                VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', %d, %d)",
index c747f902362db950bb11ac1908f5c882b55ab0a3..1a2e8c56954006b88f7c46704e1f97a827bc493a 100644 (file)
@@ -1848,6 +1848,8 @@ class DFRN
 
                DBA::insert('mail', $msg);
 
+               $msg["id"] = DBA::lastInsertId();
+
                // send notifications.
                /// @TODO Arange this mess
                $notif_params = [
index 3a0ccd891e7d95d76af8b314a525c5efe70bd2d9..82255eac9f1c5559a83f2ff9d9282587bcbf04a2 100644 (file)
@@ -3543,7 +3543,7 @@ class Diaspora
 
                        if ($item["attach"]) {
                                $cnt = preg_match_all('/href=\"(.*?)\"(.*?)title=\"(.*?)\"/ism', $item["attach"], $matches, PREG_SET_ORDER);
-                               if (cnt) {
+                               if ($cnt) {
                                        $body .= "\n".L10n::t("Attachments:")."\n";
                                        foreach ($matches as $mtch) {
                                                $body .= "[".$mtch[3]."](".$mtch[1].")\n";
index f02ddb5968bf3ef92052a91f04e0d6c3c4544bf0..f9157c678433a1b27706c3017b77c63c7a8a92fa 100644 (file)
@@ -1356,7 +1356,7 @@ class OStatus
                                                "href" => $siteinfo["url"],
                                                "type" => "text/html; charset=UTF-8",
                                                "length" => "",
-                                               "title" => $siteinfo["title"]];
+                                               "title" => defaults($siteinfo, "title", $siteinfo["url"])];
                                XML::addElement($doc, $root, "link", "", $attributes);
                                break;
                        default: