]> git.mxchange.org Git - friendica.git/blobdiff - include/enotify.php
Move mod/fsuggest to src/Module/SuggestFriends
[friendica.git] / include / enotify.php
index a1dbf77b65a8eadbb95547ceafef8427cc6f21a0..e21adc91ac64fe07dbcfc2e2aad7f6166f34dc56 100644 (file)
@@ -483,24 +483,24 @@ function notification($params)
 
        if ($show_in_notification_page) {
                $notification = DI::notify()->insert([
-                       'name'       => $params['source_name'],
-                       'name_cache' => strip_tags(BBCode::convert($params['source_name'])),
-                       'url'        => $params['source_link'],
-                       'photo'      => $params['source_photo'],
-                       'link'       => $itemlink,
-                       'uid'        => $params['uid'],
-                       'iid'        => $item_id,
-                       'parent'     => $parent_id,
-                       'type'       => $params['type'],
-                       'verb'       => $params['verb'],
-                       'otype'      => $params['otype'],
+                       'name'       => $params['source_name'] ?? '',
+                       'name_cache' => strip_tags(BBCode::convert($params['source_name'] ?? '')),
+                       'url'        => $params['source_link'] ?? '',
+                       'photo'      => $params['source_photo'] ?? '',
+                       'link'       => $itemlink ?? '',
+                       'uid'        => $params['uid'] ?? 0,
+                       'iid'        => $item_id ?? 0,
+                       'parent'     => $parent_id ?? 0,
+                       'type'       => $params['type'] ?? '',
+                       'verb'       => $params['verb'] ?? '',
+                       'otype'      => $params['otype'] ?? '',
                ]);
 
                $notification->msg = Renderer::replaceMacros($epreamble, ['$itemlink' => $notification->link]);
 
                DI::notify()->update($notification);
 
-               $itemlink  = DI::baseUrl() . '/notification/view/' . $notification->id;
+               $itemlink  = DI::baseUrl() . '/notification/' . $notification->id;
                $notify_id = $notification->id;
        }