PluginProbe
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses / 2.10.01
FluentCommunity – Ultra-Fast High-Performance Social Network, Community, LMS & Online Courses v2.10.01
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/Activity.php +19 -4 2.6.012.10.01 View file →
@@ -11,8 +11,23 @@
11 11 *
12 12 * @package FluentCommunity\App\Models
13 13 *
14 14 * @version 1.0.0
15 + *
16 + * @property int $id
17 + * @property int|null $user_id
18 + * @property int|null $feed_id
19 + * @property int|null $space_id
20 + * @property int|null $related_id
21 + * @property string|null $message
22 + * @property int|null $is_public
23 + * @property string|null $action_name
24 + * @property string|null $created_at
25 + * @property string|null $updated_at
26 + * @property-read Feed|null $feed
27 + * @property-read BaseSpace|null $space
28 + * @property-read User|null $user
29 + * @property-read XProfile|null $xprofile
15 30 */
16 31 class Activity extends Model
17 32 {
18 33 protected $table = 'fcom_user_activities';
@@ -18,9 +33,9 @@
18 33 protected $table = 'fcom_user_activities';
19 34
20 35 protected $primaryKey = 'id';
21 36
22 - protected $guarded = ['id'];
37 + protected $guarded = [ 'id' ];
23 38
24 39 protected $fillable = [
25 40 'user_id',
26 41 'feed_id',
@@ -27,9 +42,9 @@
27 42 'space_id',
28 43 'related_id',
29 44 'message',
30 45 'is_public',
31 - 'action_name'
46 + 'action_name',
32 47 ];
33 48
34 49 public static function boot()
35 50 {
@@ -84,13 +99,13 @@
84 99
85 100 switch ($this->action_name) {
86 101 case 'feed_published':
87 102 /* translators: %1$s is the person name and %2$s is the feed excerpt */
88 - $message = sprintf(__('%1$s published a new status %2$s', 'fluent-community'), '<span class="fcom_user_name">' . esc_html($this->xprofile->display_name) . '</span>', '<span class="fcom_feed_excerpt">' . $this->feed->getHumanExcerpt() . '</span>');
103 + $message = sprintf(__('%1$s published a new status %2$s', 'fluent-community'), '<span class="fcom_user_name">' . esc_html($this->xprofile->display_name) . '</span>', '<span class="fcom_feed_excerpt">' . esc_html($this->feed->getHumanExcerpt()) . '</span>');
89 104 break;
90 105 case 'comment_added':
91 106 /* translators: %1$s is the person name and %2$s is the feed excerpt */
92 - $message = sprintf(__('%1$s added a comment on %2$s', 'fluent-community'), '<span class="fcom_user_name">' . esc_html($this->xprofile->display_name) . '</span>', '<span class="fcom_feed_excerpt">' . $this->feed->getHumanExcerpt() . '</span>');
107 + $message = sprintf(__('%1$s added a comment on %2$s', 'fluent-community'), '<span class="fcom_user_name">' . esc_html($this->xprofile->display_name) . '</span>', '<span class="fcom_feed_excerpt">' . esc_html($this->feed->getHumanExcerpt()) . '</span>');
93 108 break;
94 109 }
95 110
96 111 return $message;