From: Michael Vogel Date: Tue, 31 Jul 2018 16:39:23 +0000 (+0200) Subject: Once again, notices ... (#5535) X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=71b1638d9a6cc44ab294116474c73c12d2df97f7;p=friendica.git Once again, notices ... (#5535) --- diff --git a/include/enotify.php b/include/enotify.php index 39c739a2bb..35f984b0ec 100644 --- a/include/enotify.php +++ b/include/enotify.php @@ -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); diff --git a/src/Model/Event.php b/src/Model/Event.php index 8e67da6352..c705a6ca7d 100644 --- a/src/Model/Event.php +++ b/src/Model/Event.php @@ -48,9 +48,13 @@ class Event extends BaseObject } if ($simple) { - $o = "

" . BBCode::convert($event['summary'], false, $simple) . "

"; + if (!empty($event['summary'])) { + $o = "

" . BBCode::convert($event['summary'], false, $simple) . "

"; + } - $o .= "
" . BBCode::convert($event['desc'], false, $simple) . "
"; + if (!empty($event['desc'])) { + $o .= "
" . BBCode::convert($event['desc'], false, $simple) . "
"; + } $o .= "

" . L10n::t('Starts:') . "

" . $event_start . "

"; diff --git a/src/Model/GContact.php b/src/Model/GContact.php index 9941eb1ed7..13aa093336 100644 --- a/src/Model/GContact.php +++ b/src/Model/GContact.php @@ -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)", diff --git a/src/Protocol/DFRN.php b/src/Protocol/DFRN.php index c747f90236..1a2e8c5695 100644 --- a/src/Protocol/DFRN.php +++ b/src/Protocol/DFRN.php @@ -1848,6 +1848,8 @@ class DFRN DBA::insert('mail', $msg); + $msg["id"] = DBA::lastInsertId(); + // send notifications. /// @TODO Arange this mess $notif_params = [ diff --git a/src/Protocol/Diaspora.php b/src/Protocol/Diaspora.php index 3a0ccd891e..82255eac9f 100644 --- a/src/Protocol/Diaspora.php +++ b/src/Protocol/Diaspora.php @@ -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"; diff --git a/src/Protocol/OStatus.php b/src/Protocol/OStatus.php index f02ddb5968..f9157c6784 100644 --- a/src/Protocol/OStatus.php +++ b/src/Protocol/OStatus.php @@ -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: