X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=mod%2Fping.php;h=3057fb9e312fbf6219be9f397127896ce48fbc63;hb=4683cfee123904032cebc5b6d6719c8c712caa24;hp=614900ec195a0bc84df08850fa545c9c11e9615b;hpb=6c36fd9e01510a14fea9de766b4afe6760912a2e;p=friendica.git diff --git a/mod/ping.php b/mod/ping.php index 614900ec19..3057fb9e31 100644 --- a/mod/ping.php +++ b/mod/ping.php @@ -1,19 +1,35 @@ . + * */ use Friendica\App; use Friendica\Content\ForumManager; use Friendica\Content\Text\BBCode; use Friendica\Core\Cache\Duration; -use Friendica\Core\Config; use Friendica\Core\Hook; use Friendica\Database\DBA; use Friendica\DI; use Friendica\Model\Contact; use Friendica\Model\Group; use Friendica\Model\Item; +use Friendica\Model\Notify\Type; use Friendica\Util\DateTimeFormat; use Friendica\Util\Temporal; use Friendica\Util\Proxy as ProxyUtils; @@ -42,7 +58,7 @@ use Friendica\Util\XML; * "birthdays-today": 0, * "groups": [ ], * "forums": [ ], - * "notify": 0, + * "notification": 0, * "notifications": [ ], * "sysmsgs": { * "notice": [ ], @@ -352,7 +368,7 @@ function ping_init(App $a) if ($format == 'json') { $data['groups'] = $groups_unseen; $data['forums'] = $forums_unseen; - $data['notify'] = $sysnotify_count + $intro_count + $register_count; + $data['notification'] = $sysnotify_count + $intro_count + $register_count; $data['notifications'] = $notifications; $data['sysmsgs'] = [ 'notice' => $sysmsgs, @@ -404,8 +420,8 @@ function ping_get_notifications($uid) AND NOT (`notify`.`type` IN (%d, %d)) AND $seensql `notify`.`seen` ORDER BY `notify`.`date` $order LIMIT %d, 50", intval($uid), - intval(NOTIFY_INTRO), - intval(NOTIFY_MAIL), + intval(Type::INTRO), + intval(Type::MAIL), intval($offset) ); @@ -434,7 +450,7 @@ function ping_get_notifications($uid) $notification["message"] = $notification["msg_cache"]; } else { $notification["name"] = strip_tags(BBCode::convert($notification["name"])); - $notification["message"] = format_notification_message($notification["name"], strip_tags(BBCode::convert($notification["msg"]))); + $notification["message"] = Friendica\Model\Notify::formatMessage($notification["name"], strip_tags(BBCode::convert($notification["msg"]))); q( "UPDATE `notify` SET `name_cache` = '%s', `msg_cache` = '%s' WHERE `id` = %d", @@ -444,7 +460,7 @@ function ping_get_notifications($uid) ); } - $notification["href"] = DI::baseUrl() . "/notify/view/" . $notification["id"]; + $notification["href"] = DI::baseUrl() . "/notification/" . $notification["id"]; if ($notification["visible"] && !$notification["deleted"]