PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.10.0
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.10.0
2.10.0 2.10.01 2.9.1 2.9.0 2.8.1 2.8.0 2.7.7 2.7.5 2.7.0 2.6.01 2.6.0 2.5.0 2.4.01 trunk 1.0.90 1.0.91 1.0.92 1.0.93 1.0.94 1.0.95 1.0.96 1.0.97 1.0.98 1.0.99 1.1.0 All 77 releases
← All changes | app/Models/Notification.php +11 -2 1.0.942.10.0 View file →
@@ -1,8 +1,9 @@
1 1 <?php
2 2
3 3 namespace FluentCommunity\App\Models;
4 4
5 +use FluentCommunity\App\Functions\Utility;
5 6 use FluentCommunity\App\Models\XProfile;
6 7
7 8 /**
8 9 * Meta Model - DB Model for Notifications table
@@ -11,8 +12,17 @@
11 12 *
12 13 * @package FluentCommunity\App\Models
13 14 *
14 15 * @version 1.0.0
16 + *
17 + * @property int $id
18 + * @property int|null $feed_id
19 + * @property int|null $object_id
20 + * @property int|null $src_user_id
21 + * @property string|null $src_object_type
22 + * @property string|null $action
23 + * @property mixed $route
24 + * @property string|null $content
15 25 */
16 26 class Notification extends Model
17 27 {
18 28 protected $table = 'fcom_notifications';
@@ -47,9 +57,9 @@
47 57 }
48 58
49 59 public function getRouteAttribute($value)
50 60 {
51 - return maybe_unserialize($value);
61 + return Utility::safeUnserialize($value);
52 62 }
53 63
54 64 public function subscribers()
55 65 {
@@ -108,9 +118,8 @@
108 118 }
109 119
110 120 public function scopeByStatus($query, $status, $userId)
111 121 {
112 -
113 122 $valids = ['unread', 'read'];
114 123 if (!in_array($status, $valids)) {
115 124 return $query;
116 125 }