Fix enotify item link

pull/8186/head
nupplaPhil 2020-01-28 01:12:11 +01:00
rodzic 443e106105
commit ff9eb20663
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: D8365C3D36B77D90
1 zmienionych plików z 12 dodań i 12 usunięć

Wyświetl plik

@ -483,24 +483,24 @@ function notification($params)
if ($show_in_notification_page) { if ($show_in_notification_page) {
$notification = DI::notify()->insert([ $notification = DI::notify()->insert([
'name' => $params['source_name'], 'name' => $params['source_name'],
'name_cache' => strip_tags(BBCode::convert($params['source_name'])), 'name_cache' => strip_tags(BBCode::convert($params['source_name'])),
'url' => $params['source_link'], 'url' => $params['source_link'],
'photo' => $params['source_photo'], 'photo' => $params['source_photo'],
'uid' => $params['uid'], 'link' => $itemlink,
'iid' => $item_id, 'uid' => $params['uid'],
'parent' => $parent_id, 'iid' => $item_id,
'type' => $params['type'], 'parent' => $parent_id,
'verb' => $params['verb'], 'type' => $params['type'],
'otype' => $params['otype'], 'verb' => $params['verb'],
'otype' => $params['otype'],
]); ]);
$notification->link = DI::baseUrl() . '/notification/view/' . $notification->id; $notification->msg = Renderer::replaceMacros($epreamble, ['$itemlink' => $notification->link]);
$notification->msg = Renderer::replaceMacros($epreamble, ['$itemlink' => $notification->link]);
DI::notify()->update($notification); DI::notify()->update($notification);
$itemlink = $notification->link; $itemlink = DI::baseUrl() . '/notification/view/' . $notification->id;
$notify_id = $notification->id; $notify_id = $notification->id;
} }