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/SpaceGroup.php +21 -2 1.0.952.10.0 View file →
@@ -2,10 +2,29 @@
2 2
3 3 namespace FluentCommunity\App\Models;
4 4
5 5
6 +use FluentCommunity\App\Functions\Utility;
6 7 use FluentCommunity\Framework\Support\Arr;
7 8
9 +/**
10 + * @property int $id
11 + * @property int|null $created_by
12 + * @property int|null $parent_id
13 + * @property string $title
14 + * @property string $slug
15 + * @property string|null $description
16 + * @property string|null $logo
17 + * @property string|null $cover_photo
18 + * @property string|null $type
19 + * @property string|null $privacy
20 + * @property string|null $status
21 + * @property int|null $serial
22 + * @property array $settings
23 + * @property string|null $created_at
24 + * @property string|null $updated_at
25 + * @property-read mixed $spaces
26 + */
8 27 class SpaceGroup extends Model
9 28 {
10 29 protected $table = 'fcom_spaces';
11 30
@@ -41,9 +60,9 @@
41 60 $model->created_by = get_current_user_id();
42 61 }
43 62
44 63 if (empty($model->slug)) {
45 - $slug = sanitize_title($model->tilte, time());
64 + $slug = sanitize_title($model->title, (string) time());
46 65 $model->slug = $slug;
47 66 }
48 67
49 68 $model->type = static::$type;
@@ -123,9 +142,9 @@
123 142 }
124 143
125 144 public function getSettingsAttribute($value)
126 145 {
127 - $settings = maybe_unserialize($value);
146 + $settings = Utility::safeUnserialize($value);
128 147
129 148 if (!$settings) {
130 149 $settings = [];
131 150 }